Existing rule:
Use a common layout (AV2400)
Then follows a bulleted list for formatting rules...
New language features to consider:
- dictionary initializers
We can update the existing example for object/collection initializers to:
var dto = new ConsumerDto
{
Id = 123,
Name = "Microsoft",
PartnerShip = PartnerShip.Gold,
ShoppingCart =
{
["VisualStudio"] = 1
}
};
Changes: remove () on first line; add dictionary initializer; add missing semicolon at end; correct casing of "object Initializers" in bullet text
- expression bodied members
The default settings of Resharper (current version at the time of writing is v2017.2.2) break long lines after the arrow. Example:
private string GetLongText =>
"ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC";
I propose to add an extra bullet for that formatting.
Additional notes:
- "Don't indent lambda statements..." should be: "Don't indent lambda statement blocks..."
Existing rule:
Use a common layout (AV2400)Then follows a bulleted list for formatting rules...
New language features to consider:
We can update the existing example for object/collection initializers to:
Changes: remove
()on first line; add dictionary initializer; add missing semicolon at end; correct casing of "object Initializers" in bullet textThe default settings of Resharper (current version at the time of writing is v2017.2.2) break long lines after the arrow. Example:
I propose to add an extra bullet for that formatting.
Additional notes: