Formatting of fluent class
Hi,
One of the things that still eludes me is how to configure ReSharper to not reformat Fluent calls. As an example, I have the following code:
return MySQLConfiguration
.Standard
.ConnectionString(connectionStringBuilder => connectionStringBuilder.Is(this.ConnectionString))
.AdoNetBatchSize(100);
When I use the reformatting option, this gets converted to:
return
MySQLConfiguration.Standard.ConnectionString(
connectionStringBuilder => connectionStringBuilder.Is(this.ConnectionString)).AdoNetBatchSize(100);
What option do I need to turn off to prevent this reformatting?
Thanks in advance.
Please sign in to leave a comment.
Hello Erik,
First of all please make sure you have 'Keep existing line breaks' option
turned on under ReSharper | Options | Languages | C# | Formatting Style |
Line breaks and Wrapping. Please also note that at the moment ReSharper doesn't
explicitly support fluent interface calls (in code cleanup), you're welcome
to vote for the following request: http://youtrack.jetbrains.net/issue/RSRP-88220.
Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"