Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-469390: `Formatting Style: Wrap All Chained Member Access

$
0
0
Reporter Ross McCulloch (ross.m) Ross McCulloch (ross.m)
Created Apr 24, 2018 7:33:50 AM
Updated Apr 24, 2018 8:09:20 AM
Subsystem Code Style - Formatter
Assignee Dmitry Osinovsky (Dmitry.Osinovsky)
Priority Normal
State Submitted
Type Feature
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

Currently (as of ReSharper 2018.1), with the "Wrap Chained Method Calls" option, it is possible to always chop, resulting in something similar to:

classInstance.Method1()
             .Method2()
             .Method3();

but if you have non method access (field, property, etc.) then there appears no way to also always chop, resulting in something like this:

StaticClass.Property.Method1()
           .Method2().Property;

It would be nice if there was an option to wrap and align all "." access, so we could have:

StaticClass.Property
           .Method1()
           .Method2()
           .Property;

or

target.Property = this.Object
                      .Field
                      .Method()
                      .Property;

so that you can easily just read down the column to see the access chain.


Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>