How to preserve indentation in chained methods
We have fluent-style object validation:
ForProperty(person => person.Lastname) .If(person => person.Lastname.StartsWith("A")) .Execute(Validate1) .Else() .Execute(Validate2);
When I format this piece of code with ReSharper I get this:
ForProperty(person => person.Lastname) .If(person => person.Lastname.StartsWith("A")) .Execute(Validate1) .Else() .Execute(Validate2);
Is there an option to prevent ReSharper from changing the indentation?
Please sign in to leave a comment.
Hello Bjorn
Unfortunately, there is no way to disable R# formatting for some piece of code - https://youtrack.jetbrains.com/issue/RSRP-187963.
Thanks!