c# - How to stop Resharper from line breaking after return keyword for long lines? -


when auto format resharper ctrl + alt + shift + f lines longer max line length (in case it's 80 characters), following:

    return         view(new viewmodel         {             identifier = identifier,             files = service.allfiles()         }); 

but want not wrap after "return" keyword (i.e. not have return keyword on line on own), so:

    return view(new viewmodel     {         identifier = identifier,         files = service.allfiles()     }); 

does know how "configure" resharper make happen? :)

here's example, here's i'm seeing now:

    return         repository.session.createcriteria(typeof(sometype))                   .add(expression.eq("identifier", identifier))                   .uniqueresult<sometype>(); 

when want see:

    return repository.session.createcriteria(typeof(sometype))                      .add(expression.eq("identifier", identifier))                      .uniqueresult<sometype>(); 

update:

here "chop always":

    return view(new organisationfileloadviewmodel     {         identifier = identifier,         allexistingorganisationfiles = nmdsorganisationfileloadservice.allnmdsorganisationfiles()     }); 

here "chop if long":

    return         view(new organisationfileloadviewmodel         {             identifier = identifier,             allexistingorganisationfiles = nmdsorganisationfileloadservice.allnmdsorganisationfiles()         }); 

resharper -> options -> (code editing) c# -> formatting style -> line breaks , wrapping

there lot of settings line wrapping. default wrap long lines 120 characters. may triggering break since set 80 or resharper 8.0 may have newer option return. path above 7.0, believe same or @ least similar 8.0.

the nice show examples changes make don't have test right away.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -