resharper-9.0

Why is this inherited Establish executed multiple times?

时间秒杀一切 提交于 2019-12-10 16:52:21
问题 My understand is that each Establish should only be executed once, but the code below shows it executing multiple times. We're nesting the classes to provide some grouping while keeping the unit tests for a Subject in one file. This seems like it is a bug. We're using the machine.specifications.runner.resharper Reshaper extension and MSpec 0.9.1. [Subject(typeof(string))] internal class EstablishRunTwice { Establish sharedContext = () => Console.WriteLine("Shared context"); internal class

Resharper 9 File Layout: defining sort order when sorting by access modifier not possible?

北城以北 提交于 2019-12-10 14:56:12
问题 after installing R# 9.0 my custom file layout from 8.2 did not work anymore. I recreated the same pattern using the layout designer which is new in 9.0. The part I could not reproduce was the detailed ordering definition for properties using access modifiers: Pre-9.0 it looked like this: [...] <Sort> <Access Order="private public internal protected-internal protected"/> </Sort> [...] ... resulting in the properties being ordered as defined - especially: private first! In 9.0 when using the

Allow same-line empty methods in ReSharper

淺唱寂寞╮ 提交于 2019-12-07 09:47:28
问题 Is there a way to tell ReSharper to allow same-line brackets for empty methods and constructors? For example: MyConstructor(int x) : BaseConstructor(x) { } protected virtual void Foo() { } Should not be converted to: MyConstructor(int x) : BaseConstructor(x) { } protected virtual void Foo() { } In the first case, I don't need a method body, I simply supply the parent constructor with its arguments. In the second case, I define an "optional abstract" method by making it virtual that therefore

Allow same-line empty methods in ReSharper

天涯浪子 提交于 2019-12-05 15:01:24
Is there a way to tell ReSharper to allow same-line brackets for empty methods and constructors? For example: MyConstructor(int x) : BaseConstructor(x) { } protected virtual void Foo() { } Should not be converted to: MyConstructor(int x) : BaseConstructor(x) { } protected virtual void Foo() { } In the first case, I don't need a method body, I simply supply the parent constructor with its arguments. In the second case, I define an "optional abstract" method by making it virtual that therefore doesn't require a body. Go to ReSharper -> Options... -> Code Editing -> C# -> Formatting Style ->

ReSharper: setting C# language level for Solution

我只是一个虾纸丫 提交于 2019-11-28 23:53:29
问题 Further to this question, I have lots of projects inside a solution and I dont want to create a dotsettings file for each project. Can anyone help me set the C# Language Level on a solution level. This is relevant for me as I downloaded VS2015 today and ReSharper is offering me useful refactor suggestions based on targeting C# 6 and my projects are using C#5. 回答1: I added below settings in .sln.DotSettings <s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/