When I auto format with Resharper CTRL + ALT + SHIFT + F for lines longer than max line length (in my case say it's 80 characters), I get the following:
return
View(new ViewModel
{
Identifier = identifier,
Files = service.AllFiles()
});
But what I really want is it not to wrap after the "return" keyword (i.e. not have the return keyword on a line all on its own), like so:
return View(new ViewModel
{
Identifier = identifier,
Files = service.AllFiles()
});
Does anyone know how to "configure" Resharper to make this happen? :)
Here's another example, here's what I'm seeing now:
return
repository.Session.CreateCriteria(typeof(SomeType))
.Add(Expression.Eq("Identifier", identifier))
.UniqueResult<SomeType>();
When I really want to see:
return repository.Session.CreateCriteria(typeof(SomeType))
.Add(Expression.Eq("Identifier", identifier))
.UniqueResult<SomeType>();
UPDATE:
Here is "chop always":
return View(new OrganisationFileLoadViewModel
{
Identifier = identifier,
AllExistingOrganisationFiles = nmdsOrganisationFileLoadService.AllNMDSOrganisationFiles()
});
Here is "chop if long":
return
View(new OrganisationFileLoadViewModel
{
Identifier = identifier,
AllExistingOrganisationFiles = nmdsOrganisationFileLoadService.AllNMDSOrganisationFiles()
});
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…