Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatic line breaks on dots in method chains in ReSharper

Tags:

c#

resharper

With my current settings, ReSharper breaks a long line like this:

var attributes =
    GetType().GetMethod((string) filterContext.RouteData.Values["action"]).GetCustomAttributes(
        typeof (AutomaticRedirectToViewAttribute), false);

I think it's better than not breaking the line at all, but breaking it at the dots of methods/properties makes more sense to me:

var attributes = 
    GetType()
    .GetMethod((string) filterContext.RouteData.Values["action"])
    .GetCustomAttributes(typeof (AutomaticRedirectToViewAttribute), false);

(It doesn't have to look exactly like this.) How can I setup ReSharper to do it this way? I haven't found such option in its settings.

like image 592
svick Avatar asked Sep 15 '10 13:09

svick


1 Answers

This issue hints at it not being possible with Resharper yet.

I seem to remember a forum post about it as well, but I can't find it.

like image 110
mjcopple Avatar answered Nov 15 '22 13:11

mjcopple