ReSharper LINQ Extension Method Formatting

I am struggling with formatting Resharpers. Consider the following code:

product.Resources.Where(x => x.Tracked).Pipe(y => { //Action }); 

How can I get ReSharper to back off some curly braces and curly braces just a little? I tried several Resharper formatting settings, but none of them had any effect in this case.

Edit:

I would like to have a format like this:

 product.Resources.Where(x => x.Tracked).Pipe(y => { //Action }); 
+7
source share
1 answer

See https://stackoverflow.com/a/3184778

You can configure ReSharper for this, you need to do the following (All in ReSharper -> Options -> C # -> Formatting Style):

  • In a brace, set Array and the object initializer to the next line (BSD style).
  • In the Other section, verify that Continuous Indent is set to 1.
  • Otherwise, make sure that the initializer block of the array, object, and collection is not checked.

You should get the style you want.

+5
source

All Articles