442 references to CSharpFormattingOptions2
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (37)
AutomaticCompletion\AutomaticBraceCompletionTests.cs (24)
813
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) }
888
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) }
967
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) }
1031
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) }
1095
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, false) }
1437
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, bracesOnNewLine) }
1484
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.WithFlagValue(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, bracesOnNewLine) }
1531
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.WithFlagValue(NewLineBeforeOpenBracePlacement.Accessors, bracesOnNewLine) }
1578
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.WithFlagValue(NewLineBeforeOpenBracePlacement.AnonymousMethods, bracesOnNewLine) }
1625
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.WithFlagValue(NewLineBeforeOpenBracePlacement.AnonymousTypes, bracesOnNewLine) }
1673
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.WithFlagValue(NewLineBeforeOpenBracePlacement.ControlBlocks, bracesOnNewLine) }
1727
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.WithFlagValue(NewLineBeforeOpenBracePlacement.ControlBlocks, bracesOnNewLine) }
ChangeSignature\AddParameterTests.Formatting.cs (1)
512
options: Option(
CSharpFormattingOptions2
.IndentBraces, true));
CodeActions\InitializeParameter\InitializeMemberFromParameterTests.cs (1)
1550
""", new(options: this.Option(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.All & ~NewLineBeforeOpenBracePlacement.Methods)));
CodeActions\InitializeParameter\InitializeMemberFromPrimaryConstructorParameterTests.cs (1)
979
""", new(options: this.Option(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.All & ~NewLineBeforeOpenBracePlacement.Types)));
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (10)
86
(
CSharpFormattingOptions2
.NewLineForElse, true));
143
(
CSharpFormattingOptions2
.NewLineForElse, false));
168
(
CSharpFormattingOptions2
.NewLineForElse, true));
191
(
CSharpFormattingOptions2
.NewLineForElse, true));
225
(
CSharpFormattingOptions2
.NewLineForElse, true));
232
(
CSharpFormattingOptions2
.NewLineForElse, true),
233
(
CSharpFormattingOptions2
.NewLineForCatch, true),
234
(
CSharpFormattingOptions2
.NewLineForFinally, true));
308
(
CSharpFormattingOptions2
.NewLineForElse, true));
373
var setting = Setting.Create(
CSharpFormattingOptions2
.NewLineForElse, "description", options, updater);
Microsoft.CodeAnalysis.CSharp.Features (3)
Options\CSharpEditorConfigOptionsEnumerator.cs (2)
29
yield return (CSharpWorkspaceResources.CSharp_Formatting_Rules,
CSharpFormattingOptions2
.EditorConfigOptions);
33
yield return (CSharpWorkspaceResources.CSharp_Formatting_Rules,
CSharpFormattingOptions2
.UndocumentedOptions);
Wrapping\CSharpSyntaxWrappingOptions.cs (1)
26
newLinesForBracesInObjectCollectionArrayInitializers: options.GetOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace).HasFlag(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (5)
ConvertAutoPropertyToFullProperty\ConvertAutoPropertyToFullPropertyTests_OptionSets.cs (2)
34
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.All & ~NewLineBeforeOpenBracePlacement.Properties },
41
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.All & ~NewLineBeforeOpenBracePlacement.Accessors },
src\Analyzers\CSharp\Tests\ConvertNamespace\ConvertToBlockScopedNamespaceAnalyzerTests.cs (2)
256
{
CSharpFormattingOptions2
.NewLineBeforeOpenBrace,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue & ~NewLineBeforeOpenBracePlacement.Types },
src\Analyzers\CSharp\Tests\InlineDeclaration\CSharpInlineDeclarationTests.cs (1)
2467
{
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration, ignoreSpacing },
Microsoft.CodeAnalysis.CSharp.Workspaces (113)
Formatting\CSharpFormattingOptions.cs (75)
12
/// <inheritdoc cref="
CSharpFormattingOptions2
"/>
22
defaultValue:
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue.HasFlag(flag),
24
storageMapping: new NewLineForBracesInternalStorageMapping(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, flag),
32
defaultValue:
CSharpFormattingOptions2
.SpaceBetweenParentheses.DefaultValue.HasFlag(flag),
34
storageMapping: new SpacePlacementInternalStorageMapping(
CSharpFormattingOptions2
.SpaceBetweenParentheses, flag),
71
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName"/>
72
public static Option<bool> SpacingAfterMethodDeclarationName { get; } =
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName.ToPublicOption();
74
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceWithinMethodDeclarationParenthesis"/>
75
public static Option<bool> SpaceWithinMethodDeclarationParenthesis { get; } =
CSharpFormattingOptions2
.SpaceWithinMethodDeclarationParenthesis.ToPublicOption();
77
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodDeclarationParentheses"/>
78
public static Option<bool> SpaceBetweenEmptyMethodDeclarationParentheses { get; } =
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodDeclarationParentheses.ToPublicOption();
80
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterMethodCallName"/>
81
public static Option<bool> SpaceAfterMethodCallName { get; } =
CSharpFormattingOptions2
.SpaceAfterMethodCallName.ToPublicOption();
83
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses"/>
84
public static Option<bool> SpaceWithinMethodCallParentheses { get; } =
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses.ToPublicOption();
86
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses"/>
87
public static Option<bool> SpaceBetweenEmptyMethodCallParentheses { get; } =
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses.ToPublicOption();
89
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterControlFlowStatementKeyword"/>
90
public static Option<bool> SpaceAfterControlFlowStatementKeyword { get; } =
CSharpFormattingOptions2
.SpaceAfterControlFlowStatementKeyword.ToPublicOption();
96
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterCast"/>
97
public static Option<bool> SpaceAfterCast { get; } =
CSharpFormattingOptions2
.SpaceAfterCast.ToPublicOption();
99
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration"/>
100
public static Option<bool> SpacesIgnoreAroundVariableDeclaration { get; } =
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration.ToPublicOption();
102
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBeforeOpenSquareBracket"/>
103
public static Option<bool> SpaceBeforeOpenSquareBracket { get; } =
CSharpFormattingOptions2
.SpaceBeforeOpenSquareBracket.ToPublicOption();
105
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBetweenEmptySquareBrackets"/>
106
public static Option<bool> SpaceBetweenEmptySquareBrackets { get; } =
CSharpFormattingOptions2
.SpaceBetweenEmptySquareBrackets.ToPublicOption();
108
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceWithinSquareBrackets"/>
109
public static Option<bool> SpaceWithinSquareBrackets { get; } =
CSharpFormattingOptions2
.SpaceWithinSquareBrackets.ToPublicOption();
111
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterColonInBaseTypeDeclaration"/>
112
public static Option<bool> SpaceAfterColonInBaseTypeDeclaration { get; } =
CSharpFormattingOptions2
.SpaceAfterColonInBaseTypeDeclaration.ToPublicOption();
114
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterComma"/>
115
public static Option<bool> SpaceAfterComma { get; } =
CSharpFormattingOptions2
.SpaceAfterComma.ToPublicOption();
117
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterDot"/>
118
public static Option<bool> SpaceAfterDot { get; } =
CSharpFormattingOptions2
.SpaceAfterDot.ToPublicOption();
120
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceAfterSemicolonsInForStatement"/>
121
public static Option<bool> SpaceAfterSemicolonsInForStatement { get; } =
CSharpFormattingOptions2
.SpaceAfterSemicolonsInForStatement.ToPublicOption();
123
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBeforeColonInBaseTypeDeclaration"/>
124
public static Option<bool> SpaceBeforeColonInBaseTypeDeclaration { get; } =
CSharpFormattingOptions2
.SpaceBeforeColonInBaseTypeDeclaration.ToPublicOption();
126
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBeforeComma"/>
127
public static Option<bool> SpaceBeforeComma { get; } =
CSharpFormattingOptions2
.SpaceBeforeComma.ToPublicOption();
129
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBeforeDot"/>
130
public static Option<bool> SpaceBeforeDot { get; } =
CSharpFormattingOptions2
.SpaceBeforeDot.ToPublicOption();
132
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpaceBeforeSemicolonsInForStatement"/>
133
public static Option<bool> SpaceBeforeSemicolonsInForStatement { get; } =
CSharpFormattingOptions2
.SpaceBeforeSemicolonsInForStatement.ToPublicOption();
135
/// <inheritdoc cref="
CSharpFormattingOptions2
.SpacingAroundBinaryOperator"/>
137
CSharpFormattingOptions2
.SpacingAroundBinaryOperator.ToPublicOption().ConvertEnumOption<BinaryOperatorSpacingOptionsInternal, BinaryOperatorSpacingOptions>();
139
/// <inheritdoc cref="
CSharpFormattingOptions2
.IndentBraces"/>
140
public static Option<bool> IndentBraces { get; } =
CSharpFormattingOptions2
.IndentBraces.ToPublicOption();
142
/// <inheritdoc cref="
CSharpFormattingOptions2
.IndentBlock"/>
143
public static Option<bool> IndentBlock { get; } =
CSharpFormattingOptions2
.IndentBlock.ToPublicOption();
145
/// <inheritdoc cref="
CSharpFormattingOptions2
.IndentSwitchSection"/>
146
public static Option<bool> IndentSwitchSection { get; } =
CSharpFormattingOptions2
.IndentSwitchSection.ToPublicOption();
148
/// <inheritdoc cref="
CSharpFormattingOptions2
.IndentSwitchCaseSection"/>
149
public static Option<bool> IndentSwitchCaseSection { get; } =
CSharpFormattingOptions2
.IndentSwitchCaseSection.ToPublicOption();
151
/// <inheritdoc cref="
CSharpFormattingOptions2
.IndentSwitchCaseSectionWhenBlock"/>
152
public static Option<bool> IndentSwitchCaseSectionWhenBlock { get; } =
CSharpFormattingOptions2
.IndentSwitchCaseSectionWhenBlock.ToPublicOption();
154
/// <inheritdoc cref="
CSharpFormattingOptions2
.LabelPositioning"/>
156
CSharpFormattingOptions2
.LabelPositioning.ToPublicOption().ConvertEnumOption<LabelPositionOptionsInternal, LabelPositionOptions>();
158
/// <inheritdoc cref="
CSharpFormattingOptions2
.WrappingPreserveSingleLine"/>
159
public static Option<bool> WrappingPreserveSingleLine { get; } =
CSharpFormattingOptions2
.WrappingPreserveSingleLine.ToPublicOption();
161
/// <inheritdoc cref="
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine"/>
162
public static Option<bool> WrappingKeepStatementsOnSingleLine { get; } =
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine.ToPublicOption();
174
/// <inheritdoc cref="
CSharpFormattingOptions2
.NewLineForElse"/>
175
public static Option<bool> NewLineForElse { get; } =
CSharpFormattingOptions2
.NewLineForElse.ToPublicOption();
177
/// <inheritdoc cref="
CSharpFormattingOptions2
.NewLineForCatch"/>
178
public static Option<bool> NewLineForCatch { get; } =
CSharpFormattingOptions2
.NewLineForCatch.ToPublicOption();
180
/// <inheritdoc cref="
CSharpFormattingOptions2
.NewLineForFinally"/>
181
public static Option<bool> NewLineForFinally { get; } =
CSharpFormattingOptions2
.NewLineForFinally.ToPublicOption();
183
/// <inheritdoc cref="
CSharpFormattingOptions2
.NewLineForMembersInObjectInit"/>
184
public static Option<bool> NewLineForMembersInObjectInit { get; } =
CSharpFormattingOptions2
.NewLineForMembersInObjectInit.ToPublicOption();
186
/// <inheritdoc cref="
CSharpFormattingOptions2
.NewLineForMembersInAnonymousTypes"/>
187
public static Option<bool> NewLineForMembersInAnonymousTypes { get; } =
CSharpFormattingOptions2
.NewLineForMembersInAnonymousTypes.ToPublicOption();
189
/// <inheritdoc cref="
CSharpFormattingOptions2
.NewLineForClausesInQuery"/>
190
public static Option<bool> NewLineForClausesInQuery { get; } =
CSharpFormattingOptions2
.NewLineForClausesInQuery.ToPublicOption();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpSyntaxFormattingOptions.cs (38)
74
(options.GetOption(
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration) ? SpacePlacement.IgnoreAroundVariableDeclaration : 0) |
75
(options.GetOption(
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName) ? SpacePlacement.AfterMethodDeclarationName : 0) |
76
(options.GetOption(
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodDeclarationParentheses) ? SpacePlacement.BetweenEmptyMethodDeclarationParentheses : 0) |
77
(options.GetOption(
CSharpFormattingOptions2
.SpaceWithinMethodDeclarationParenthesis) ? SpacePlacement.WithinMethodDeclarationParenthesis : 0) |
78
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterMethodCallName) ? SpacePlacement.AfterMethodCallName : 0) |
79
(options.GetOption(
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses) ? SpacePlacement.BetweenEmptyMethodCallParentheses : 0) |
80
(options.GetOption(
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses) ? SpacePlacement.WithinMethodCallParentheses : 0) |
81
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterControlFlowStatementKeyword) ? SpacePlacement.AfterControlFlowStatementKeyword : 0) |
82
options.GetOption(
CSharpFormattingOptions2
.SpaceBetweenParentheses).ToSpacePlacement() |
83
(options.GetOption(
CSharpFormattingOptions2
.SpaceBeforeSemicolonsInForStatement) ? SpacePlacement.BeforeSemicolonsInForStatement : 0) |
84
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterSemicolonsInForStatement) ? SpacePlacement.AfterSemicolonsInForStatement : 0) |
85
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterCast) ? SpacePlacement.AfterCast : 0) |
86
(options.GetOption(
CSharpFormattingOptions2
.SpaceBeforeOpenSquareBracket) ? SpacePlacement.BeforeOpenSquareBracket : 0) |
87
(options.GetOption(
CSharpFormattingOptions2
.SpaceBetweenEmptySquareBrackets) ? SpacePlacement.BetweenEmptySquareBrackets : 0) |
88
(options.GetOption(
CSharpFormattingOptions2
.SpaceWithinSquareBrackets) ? SpacePlacement.WithinSquareBrackets : 0) |
89
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterColonInBaseTypeDeclaration) ? SpacePlacement.AfterColonInBaseTypeDeclaration : 0) |
90
(options.GetOption(
CSharpFormattingOptions2
.SpaceBeforeColonInBaseTypeDeclaration) ? SpacePlacement.BeforeColonInBaseTypeDeclaration : 0) |
91
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterComma) ? SpacePlacement.AfterComma : 0) |
92
(options.GetOption(
CSharpFormattingOptions2
.SpaceBeforeComma) ? SpacePlacement.BeforeComma : 0) |
93
(options.GetOption(
CSharpFormattingOptions2
.SpaceAfterDot) ? SpacePlacement.AfterDot : 0) |
94
(options.GetOption(
CSharpFormattingOptions2
.SpaceBeforeDot) ? SpacePlacement.BeforeDot : 0);
95
SpacingAroundBinaryOperator = options.GetOption(
CSharpFormattingOptions2
.SpacingAroundBinaryOperator);
97
(options.GetOption(
CSharpFormattingOptions2
.NewLineForMembersInObjectInit) ? NewLinePlacement.BeforeMembersInObjectInitializers : 0) |
98
(options.GetOption(
CSharpFormattingOptions2
.NewLineForMembersInAnonymousTypes) ? NewLinePlacement.BeforeMembersInAnonymousTypes : 0) |
99
(options.GetOption(
CSharpFormattingOptions2
.NewLineForElse) ? NewLinePlacement.BeforeElse : 0) |
100
(options.GetOption(
CSharpFormattingOptions2
.NewLineForCatch) ? NewLinePlacement.BeforeCatch : 0) |
101
(options.GetOption(
CSharpFormattingOptions2
.NewLineForFinally) ? NewLinePlacement.BeforeFinally : 0) |
102
options.GetOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace).ToNewLinePlacement() |
103
(options.GetOption(
CSharpFormattingOptions2
.NewLineForClausesInQuery) ? NewLinePlacement.BetweenQueryExpressionClauses : 0);
104
LabelPositioning = options.GetOption(
CSharpFormattingOptions2
.LabelPositioning);
106
(options.GetOption(
CSharpFormattingOptions2
.IndentBraces) ? IndentationPlacement.Braces : 0) |
107
(options.GetOption(
CSharpFormattingOptions2
.IndentBlock) ? IndentationPlacement.BlockContents : 0) |
108
(options.GetOption(
CSharpFormattingOptions2
.IndentSwitchCaseSection) ? IndentationPlacement.SwitchCaseContents : 0) |
109
(options.GetOption(
CSharpFormattingOptions2
.IndentSwitchCaseSectionWhenBlock) ? IndentationPlacement.SwitchCaseContentsWhenBlock : 0) |
110
(options.GetOption(
CSharpFormattingOptions2
.IndentSwitchSection) ? IndentationPlacement.SwitchSection : 0);
111
WrappingKeepStatementsOnSingleLine = options.GetOption(
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine);
112
WrappingPreserveSingleLine = options.GetOption(
CSharpFormattingOptions2
.WrappingPreserveSingleLine);
115
CollectionExpressionWrappingLength = options.GetOption(
CSharpFormattingOptions2
.CollectionExpressionWrappingLength);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (70)
CodeStyle\CSharpEditorConfigCodeStyleParserTests.cs (2)
28
=> Assert.Equal(parsedValue, (BinaryOperatorSpacingOptions)
CSharpFormattingOptions2
.ParseEditorConfigSpacingAroundBinaryOperator(rawValue));
40
=> Assert.Equal(parsedValue, (LabelPositionOptions)
CSharpFormattingOptions2
.ParseEditorConfigLabelPositioning(rawValue));
Formatting\EditorConfigOptionParserTests.cs (10)
30
Assert.Equal(value,
CSharpFormattingOptions2
.ParseSpacingWithinParenthesesList(list));
31
Assert.Equal(roundtrip,
CSharpFormattingOptions2
.ToEditorConfigValue(value));
39
=> Assert.True(
CSharpFormattingOptions2
.ParseEditorConfigSpacingAroundBinaryOperator(value) == (BinaryOperatorSpacingOptionsInternal)expectedResult,
47
=> Assert.True(
CSharpFormattingOptions2
.ParseEditorConfigSpacingAroundBinaryOperator(value) == BinaryOperatorSpacingOptionsInternal.Single,
55
=> Assert.True(
CSharpFormattingOptions2
.ParseEditorConfigLabelPositioning(value) == (LabelPositionOptionsInternal)expectedValue,
63
=> Assert.True(
CSharpFormattingOptions2
.ParseEditorConfigLabelPositioning(value) == LabelPositionOptionsInternal.NoIndent,
98
Assert.Equal(value,
CSharpFormattingOptions2
.ParseNewLineBeforeOpenBracePlacementList(list));
99
Assert.Equal(roundtrip,
CSharpFormattingOptions2
.ToEditorConfigValue(value));
108
=> Assert.True(
CSharpFormattingOptions2
.DetermineIfIgnoreSpacesAroundVariableDeclarationIsSet(value),
116
=> Assert.False(
CSharpFormattingOptions2
.DetermineIfIgnoreSpacesAroundVariableDeclarationIsSet(value),
Formatting\FormattingMultipleSpanTests.cs (2)
101
{
CSharpFormattingOptions2
.IndentBlock, false }
127
{
CSharpFormattingOptions2
.WrappingPreserveSingleLine, false }
Formatting\FormattingTests.cs (48)
15
using static Microsoft.CodeAnalysis.CSharp.Formatting.
CSharpFormattingOptions2
;
1020
{
CSharpFormattingOptions2
.SpacingAroundBinaryOperator, BinaryOperatorSpacingOptions.Remove }
1571
{
CSharpFormattingOptions2
.WrappingPreserveSingleLine, false }
1646
{
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine, false }
1717
{
CSharpFormattingOptions2
.WrappingPreserveSingleLine, false },
1718
{
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine, false }
1803
{
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine, false }
2154
{
CSharpFormattingOptions2
.NewLineForElse, false },
2155
{
CSharpFormattingOptions2
.NewLineForCatch, false },
2156
{
CSharpFormattingOptions2
.NewLineForFinally, false }
2329
{
CSharpFormattingOptions2
.NewLineForMembersInObjectInit, false },
2330
{
CSharpFormattingOptions2
.NewLineForMembersInAnonymousTypes, false },
2331
{
CSharpFormattingOptions2
.NewLineForClausesInQuery, false }
5395
{
CSharpFormattingOptions2
.SpaceAfterMethodCallName, true }
5419
{
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses, true }
5445
{
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses, true }
5471
{
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses, true }
6185
{
CSharpFormattingOptions2
.LabelPositioning, LabelPositionOptions.LeftMost }
6459
var optionSet = new OptionsCollection(LanguageNames.CSharp) { {
CSharpFormattingOptions2
.SpaceAfterControlFlowStatementKeyword, false } };
6570
var optionSet = new OptionsCollection(LanguageNames.CSharp) { {
CSharpFormattingOptions2
.SpaceAfterComma, false } };
6582
optionSet.Add(
CSharpFormattingOptions2
.SpaceBeforeComma, true);
6694
{
CSharpFormattingOptions2
.NewLineForElse, false }
6922
var options = new OptionsCollection(LanguageNames.CSharp) { {
CSharpFormattingOptions2
.WrappingPreserveSingleLine, false } };
6941
var options = new OptionsCollection(LanguageNames.CSharp) { {
CSharpFormattingOptions2
.WrappingPreserveSingleLine, false } };
6959
var options = new OptionsCollection(LanguageNames.CSharp) { {
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine, false } };
7515
{
CSharpFormattingOptions2
.SpaceWithinSquareBrackets, true },
7516
{
CSharpFormattingOptions2
.SpaceBetweenEmptySquareBrackets, false }
7536
var options = new OptionsCollection(LanguageNames.CSharp) { {
CSharpFormattingOptions2
.SpaceBeforeOpenSquareBracket, true } };
7555
var options = new OptionsCollection(LanguageNames.CSharp) { {
CSharpFormattingOptions2
.SpaceWithinSquareBrackets, true } };
7692
{
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration, true }
8420
{
CSharpFormattingOptions2
.SpaceAfterMethodCallName, true },
8421
{
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses, true },
8422
{
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses, true }
8463
{
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses, true },
8464
{
CSharpFormattingOptions2
.SpaceAfterMethodCallName, true },
8465
{
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses, true },
8573
{
CSharpFormattingOptions2
.SpaceAfterSemicolonsInForStatement, false },
8606
{
CSharpFormattingOptions2
.SpaceBeforeSemicolonsInForStatement, true },
8607
{
CSharpFormattingOptions2
.SpaceAfterSemicolonsInForStatement, false },
8640
{
CSharpFormattingOptions2
.SpaceBeforeSemicolonsInForStatement, true },
8695
{
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName, true }
9110
{
CSharpFormattingOptions2
.WrappingPreserveSingleLine, true },
9111
{
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine, false},
9774
{
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration, true }
9804
{
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration, true },
9805
{
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine, false }
9911
{
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration, true }
9937
{
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration, false }
Formatting\FormattingTests_Patterns.cs (8)
62
{
CSharpFormattingOptions2
.SpacingAroundBinaryOperator, spacing },
149
{
CSharpFormattingOptions2
.SpacingAroundBinaryOperator, spacing },
150
{
CSharpFormattingOptions2
.SpaceBetweenParentheses,
CSharpFormattingOptions2
.SpaceBetweenParentheses.DefaultValue.WithFlagValue(SpacePlacementWithinParentheses.Expressions, spaceWithinExpressionParentheses) },
204
{
CSharpFormattingOptions2
.SpacingAroundBinaryOperator, spacing },
290
{
CSharpFormattingOptions2
.SpacingAroundBinaryOperator, spacing },
291
{
CSharpFormattingOptions2
.SpaceBetweenParentheses,
CSharpFormattingOptions2
.SpaceBetweenParentheses.DefaultValue.WithFlagValue(SpacePlacementWithinParentheses.Expressions, spaceWithinExpressionParentheses) },
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
Options\DocumentOptionSetTests.cs (2)
93
var option =
CSharpFormattingOptions2
.NewLineBeforeOpenBrace;
155
var option =
CSharpFormattingOptions2
.SpaceBetweenParentheses;
Options\OptionKeyTests.cs (2)
185
Assert.All(
CSharpFormattingOptions2
.EditorConfigOptions, o => Assert.True(o.Definition.IsEditorConfigOption));
186
Assert.All(
CSharpFormattingOptions2
.UndocumentedOptions, o => Assert.True(o.Definition.IsEditorConfigOption));
Microsoft.VisualStudio.LanguageServices.CSharp (198)
EditorConfigSettings\DataProvider\Whitespace\CSharpWhitespaceSettingsProvider.cs (47)
42
yield return Setting.Create(
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName, CSharpVSResources.Insert_space_between_method_name_and_its_opening_parenthesis, options, updaterService);
43
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceWithinMethodDeclarationParenthesis, CSharpVSResources.Insert_space_within_parameter_list_parentheses, options, updaterService);
44
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodDeclarationParentheses, CSharpVSResources.Insert_space_within_empty_parameter_list_parentheses, options, updaterService);
45
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceAfterMethodCallName, CSharpVSResources.Insert_space_between_called_method_name_and_its_opening_parenthesis, options, updaterService);
46
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses, CSharpVSResources.Insert_space_within_argument_list_parentheses, options, updaterService);
47
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses, CSharpVSResources.Insert_space_within_empty_argument_list_parentheses, options, updaterService);
49
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceAfterControlFlowStatementKeyword, CSharpVSResources.Insert_space_after_keywords_in_control_flow_statements, options, updaterService);
52
yield return Setting.CreateEnumFlags(
CSharpFormattingOptions2
.SpaceBetweenParentheses, (int)SpacePlacementWithinParentheses.Expressions, CSharpVSResources.Insert_space_within_parentheses_of_expressions, spaceBetweenParenthesesValue, s_spaceBetweenParenthesesConversions, options, updaterService);
53
yield return Setting.CreateEnumFlags(
CSharpFormattingOptions2
.SpaceBetweenParentheses, (int)SpacePlacementWithinParentheses.TypeCasts, CSharpVSResources.Insert_space_within_parentheses_of_type_casts, spaceBetweenParenthesesValue, s_spaceBetweenParenthesesConversions, options, updaterService);
54
yield return Setting.CreateEnumFlags(
CSharpFormattingOptions2
.SpaceBetweenParentheses, (int)SpacePlacementWithinParentheses.ControlFlowStatements, CSharpVSResources.Insert_spaces_within_parentheses_of_control_flow_statements, spaceBetweenParenthesesValue, s_spaceBetweenParenthesesConversions, options, updaterService);
56
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceAfterCast, CSharpVSResources.Insert_space_after_cast, options, updaterService);
57
yield return Setting.Create(
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration, CSharpVSResources.Ignore_spaces_in_declaration_statements, options, updaterService);
59
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceBeforeOpenSquareBracket, CSharpVSResources.Insert_space_before_open_square_bracket, options, updaterService);
60
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceBetweenEmptySquareBrackets, CSharpVSResources.Insert_space_within_empty_square_brackets, options, updaterService);
61
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceWithinSquareBrackets, CSharpVSResources.Insert_spaces_within_square_brackets, options, updaterService);
63
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceAfterColonInBaseTypeDeclaration, CSharpVSResources.Insert_space_after_colon_for_base_or_interface_in_type_declaration, options, updaterService);
64
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceAfterComma, CSharpVSResources.Insert_space_after_comma, options, updaterService);
65
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceAfterDot, CSharpVSResources.Insert_space_after_dot, options, updaterService);
66
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceAfterSemicolonsInForStatement, CSharpVSResources.Insert_space_after_semicolon_in_for_statement, options, updaterService);
67
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceBeforeColonInBaseTypeDeclaration, CSharpVSResources.Insert_space_before_colon_for_base_or_interface_in_type_declaration, options, updaterService);
68
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceBeforeComma, CSharpVSResources.Insert_space_before_comma, options, updaterService);
69
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceBeforeDot, CSharpVSResources.Insert_space_before_dot, options, updaterService);
70
yield return Setting.Create(
CSharpFormattingOptions2
.SpaceBeforeSemicolonsInForStatement, CSharpVSResources.Insert_space_before_semicolon_in_for_statement, options, updaterService);
72
yield return Setting.Create(
CSharpFormattingOptions2
.SpacingAroundBinaryOperator, CSharpVSResources.Set_spacing_for_operators, options, updaterService);
78
yield return Setting.CreateEnumFlags(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.Types, CSharpVSResources.Place_open_brace_on_new_line_for_types, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService);
79
yield return Setting.CreateEnumFlags(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.Methods, CSharpVSResources.Place_open_brace_on_new_line_for_methods_local_functions, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService);
80
yield return Setting.CreateEnumFlags(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.Properties, CSharpVSResources.Place_open_brace_on_new_line_for_properties_indexers_and_events, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService);
81
yield return Setting.CreateEnumFlags(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.Accessors, CSharpVSResources.Place_open_brace_on_new_line_for_property_indexer_and_event_accessors, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService);
82
yield return Setting.CreateEnumFlags(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.AnonymousMethods, CSharpVSResources.Place_open_brace_on_new_line_for_anonymous_methods, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService);
83
yield return Setting.CreateEnumFlags(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.ControlBlocks, CSharpVSResources.Place_open_brace_on_new_line_for_control_blocks, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService);
84
yield return Setting.CreateEnumFlags(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.AnonymousTypes, CSharpVSResources.Place_open_brace_on_new_line_for_anonymous_types, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService);
85
yield return Setting.CreateEnumFlags(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, CSharpVSResources.Place_open_brace_on_new_line_for_object_collection_array_and_with_initializers, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService);
86
yield return Setting.CreateEnumFlags(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.LambdaExpressionBody, CSharpVSResources.Place_open_brace_on_new_line_for_lambda_expression, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService);
88
yield return Setting.Create(
CSharpFormattingOptions2
.NewLineForElse, CSharpVSResources.Place_else_on_new_line, options, updaterService);
89
yield return Setting.Create(
CSharpFormattingOptions2
.NewLineForCatch, CSharpVSResources.Place_catch_on_new_line, options, updaterService);
90
yield return Setting.Create(
CSharpFormattingOptions2
.NewLineForFinally, CSharpVSResources.Place_finally_on_new_line, options, updaterService);
91
yield return Setting.Create(
CSharpFormattingOptions2
.NewLineForMembersInObjectInit, CSharpVSResources.Place_members_in_object_initializers_on_new_line, options, updaterService);
92
yield return Setting.Create(
CSharpFormattingOptions2
.NewLineForMembersInAnonymousTypes, CSharpVSResources.Place_members_in_anonymous_types_on_new_line, options, updaterService);
93
yield return Setting.Create(
CSharpFormattingOptions2
.NewLineForClausesInQuery, CSharpVSResources.Place_query_expression_clauses_on_new_line, options, updaterService);
98
yield return Setting.Create(
CSharpFormattingOptions2
.IndentBlock, CSharpVSResources.Indent_block_contents, options, updaterService);
99
yield return Setting.Create(
CSharpFormattingOptions2
.IndentBraces, CSharpVSResources.Indent_open_and_close_braces, options, updaterService);
100
yield return Setting.Create(
CSharpFormattingOptions2
.IndentSwitchCaseSection, CSharpVSResources.Indent_case_contents, options, updaterService);
101
yield return Setting.Create(
CSharpFormattingOptions2
.IndentSwitchCaseSectionWhenBlock, CSharpVSResources.Indent_case_contents_when_block, options, updaterService);
102
yield return Setting.Create(
CSharpFormattingOptions2
.IndentSwitchSection, CSharpVSResources.Indent_case_labels, options, updaterService);
103
yield return Setting.Create(
CSharpFormattingOptions2
.LabelPositioning, CSharpVSResources.Label_Indentation, options, updaterService);
108
yield return Setting.Create(
CSharpFormattingOptions2
.WrappingPreserveSingleLine, CSharpVSResources.Leave_block_on_single_line, options, updaterService);
109
yield return Setting.Create(
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine, CSharpVSResources.Leave_statements_and_member_declarations_on_the_same_line, options, updaterService);
Options\AutomationObject\AutomationObject.Formatting.cs (98)
14
get { return GetBooleanOption(
CSharpFormattingOptions2
.IndentBlock); }
15
set { SetBooleanOption(
CSharpFormattingOptions2
.IndentBlock, value); }
20
get { return GetBooleanOption(
CSharpFormattingOptions2
.IndentBraces); }
21
set { SetBooleanOption(
CSharpFormattingOptions2
.IndentBraces, value); }
26
get { return GetBooleanOption(
CSharpFormattingOptions2
.IndentSwitchCaseSection); }
27
set { SetBooleanOption(
CSharpFormattingOptions2
.IndentSwitchCaseSection, value); }
32
get { return GetBooleanOption(
CSharpFormattingOptions2
.IndentSwitchCaseSectionWhenBlock); }
33
set { SetBooleanOption(
CSharpFormattingOptions2
.IndentSwitchCaseSectionWhenBlock, value); }
38
get { return GetBooleanOption(
CSharpFormattingOptions2
.IndentSwitchSection); }
39
set { SetBooleanOption(
CSharpFormattingOptions2
.IndentSwitchSection, value); }
44
get { return (int)GetOption(
CSharpFormattingOptions2
.LabelPositioning); }
45
set { SetOption(
CSharpFormattingOptions2
.LabelPositioning, (LabelPositionOptionsInternal)value); }
50
get { return (int)GetOption(
CSharpFormattingOptions2
.LabelPositioning); }
51
set { SetOption(
CSharpFormattingOptions2
.LabelPositioning, (LabelPositionOptionsInternal)value); }
56
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineForMembersInAnonymousTypes); }
57
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineForMembersInAnonymousTypes, value); }
62
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.AnonymousMethods); }
63
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.AnonymousMethods, value); }
68
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.AnonymousTypes); }
69
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.AnonymousTypes, value); }
74
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.ControlBlocks); }
75
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.ControlBlocks, value); }
80
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.LambdaExpressionBody); }
81
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.LambdaExpressionBody, value); }
86
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.Methods); }
87
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.Methods, value); }
92
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.Properties); }
93
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.Properties, value); }
98
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.Accessors); }
99
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.Accessors, value); }
104
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers); }
105
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, value); }
110
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.Types); }
111
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, NewLineBeforeOpenBracePlacement.Types, value); }
116
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineForCatch); }
117
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineForCatch, value); }
122
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineForElse); }
123
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineForElse, value); }
128
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineForFinally); }
129
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineForFinally, value); }
134
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineForMembersInObjectInit); }
135
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineForMembersInObjectInit, value); }
140
get { return GetBooleanOption(
CSharpFormattingOptions2
.NewLineForClausesInQuery); }
141
set { SetBooleanOption(
CSharpFormattingOptions2
.NewLineForClausesInQuery, value); }
146
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterColonInBaseTypeDeclaration); }
147
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterColonInBaseTypeDeclaration, value); }
152
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterCast); }
153
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterCast, value); }
158
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterComma); }
159
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterComma, value); }
164
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterDot); }
165
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterDot, value); }
170
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterMethodCallName); }
171
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterMethodCallName, value); }
176
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName); }
177
set { SetBooleanOption(
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName, value); }
182
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterSemicolonsInForStatement); }
183
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterSemicolonsInForStatement, value); }
188
get { return (int)GetOption(
CSharpFormattingOptions2
.SpacingAroundBinaryOperator); }
189
set { SetOption(
CSharpFormattingOptions2
.SpacingAroundBinaryOperator, (BinaryOperatorSpacingOptionsInternal)value); }
194
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceBeforeColonInBaseTypeDeclaration); }
195
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceBeforeColonInBaseTypeDeclaration, value); }
200
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceBeforeComma); }
201
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceBeforeComma, value); }
206
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceBeforeDot); }
207
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceBeforeDot, value); }
212
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceBeforeOpenSquareBracket); }
213
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceBeforeOpenSquareBracket, value); }
218
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceBeforeSemicolonsInForStatement); }
219
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceBeforeSemicolonsInForStatement, value); }
224
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses); }
225
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses, value); }
230
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodDeclarationParentheses); }
231
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodDeclarationParentheses, value); }
236
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceBetweenEmptySquareBrackets); }
237
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceBetweenEmptySquareBrackets, value); }
242
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterControlFlowStatementKeyword); }
243
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceAfterControlFlowStatementKeyword, value); }
248
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceBetweenParentheses, SpacePlacementWithinParentheses.TypeCasts); }
249
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceBetweenParentheses, SpacePlacementWithinParentheses.TypeCasts, value); }
254
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceBetweenParentheses, SpacePlacementWithinParentheses.Expressions); }
255
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceBetweenParentheses, SpacePlacementWithinParentheses.Expressions, value); }
260
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceBetweenParentheses, SpacePlacementWithinParentheses.ControlFlowStatements); }
261
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceBetweenParentheses, SpacePlacementWithinParentheses.ControlFlowStatements, value); }
266
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses); }
267
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses, value); }
272
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceWithinMethodDeclarationParenthesis); }
273
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceWithinMethodDeclarationParenthesis, value); }
278
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpaceWithinSquareBrackets); }
279
set { SetBooleanOption(
CSharpFormattingOptions2
.SpaceWithinSquareBrackets, value); }
284
get { return (int)GetOption(
CSharpFormattingOptions2
.SpacingAroundBinaryOperator); }
285
set { SetOption(
CSharpFormattingOptions2
.SpacingAroundBinaryOperator, (BinaryOperatorSpacingOptionsInternal)value); }
290
get { return GetBooleanOption(
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration); }
291
set { SetBooleanOption(
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration, value); }
296
get { return GetBooleanOption(
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine); }
297
set { SetBooleanOption(
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine, value); }
302
get { return GetBooleanOption(
CSharpFormattingOptions2
.WrappingPreserveSingleLine); }
303
set { SetBooleanOption(
CSharpFormattingOptions2
.WrappingPreserveSingleLine, value); }
Options\CSharpVisualStudioOptionStorageReadFallbacks.cs (2)
34
=> TryReadFlags(s_storages, (int)
CSharpFormattingOptions2
.SpaceBetweenParentheses.DefaultValue, readValue, out var intValue) ? (SpacePlacementWithinParentheses)intValue : default(Optional<object?>);
60
=> TryReadFlags(s_storages, (int)
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue, readValue, out var intValue) ? (NewLineBeforeOpenBracePlacement)intValue : default(Optional<object?>);
Options\Formatting\IndentationViewModel.cs (8)
86
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.IndentBlock, CSharpVSResources.Indent_block_contents, BlockContentPreview, this, optionStore));
87
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.IndentBraces, CSharpVSResources.Indent_open_and_close_braces, IndentBracePreview, this, optionStore));
88
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.IndentSwitchCaseSection, CSharpVSResources.Indent_case_contents, SwitchCasePreview, this, optionStore));
89
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.IndentSwitchCaseSectionWhenBlock, CSharpVSResources.Indent_case_contents_when_block, SwitchCaseWhenBlockPreview, this, optionStore));
90
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.IndentSwitchSection, CSharpVSResources.Indent_case_labels, SwitchCasePreview, this, optionStore));
94
Items.Add(new RadioButtonViewModel<LabelPositionOptionsInternal>(CSharpVSResources.Place_goto_labels_in_leftmost_column, GotoLabelPreview, "goto", LabelPositionOptionsInternal.LeftMost,
CSharpFormattingOptions2
.LabelPositioning, this, optionStore));
95
Items.Add(new RadioButtonViewModel<LabelPositionOptionsInternal>(CSharpVSResources.Indent_labels_normally, GotoLabelPreview, "goto", LabelPositionOptionsInternal.NoIndent,
CSharpFormattingOptions2
.LabelPositioning, this, optionStore));
96
Items.Add(new RadioButtonViewModel<LabelPositionOptionsInternal>(CSharpVSResources.Place_goto_labels_one_indent_less_than_current, GotoLabelPreview, "goto", LabelPositionOptionsInternal.OneLess,
CSharpFormattingOptions2
.LabelPositioning, this, optionStore));
Options\Formatting\NewLinesViewModel.cs (15)
236
Items.Add(new CheckBoxEnumFlagsOptionViewModel<NewLineBeforeOpenBracePlacement>(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.Types, CSharpVSResources.Place_open_brace_on_new_line_for_types, s_previewText, this, optionStore, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions));
237
Items.Add(new CheckBoxEnumFlagsOptionViewModel<NewLineBeforeOpenBracePlacement>(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.Methods, CSharpVSResources.Place_open_brace_on_new_line_for_methods_local_functions, s_methodPreview, this, optionStore, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions));
238
Items.Add(new CheckBoxEnumFlagsOptionViewModel<NewLineBeforeOpenBracePlacement>(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.Properties, CSharpVSResources.Place_open_brace_on_new_line_for_properties_indexers_and_events, s_propertyPreview, this, optionStore, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions));
239
Items.Add(new CheckBoxEnumFlagsOptionViewModel<NewLineBeforeOpenBracePlacement>(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.Accessors, CSharpVSResources.Place_open_brace_on_new_line_for_property_indexer_and_event_accessors, s_propertyPreview, this, optionStore, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions));
240
Items.Add(new CheckBoxEnumFlagsOptionViewModel<NewLineBeforeOpenBracePlacement>(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.AnonymousMethods, CSharpVSResources.Place_open_brace_on_new_line_for_anonymous_methods, s_anonymousMethodPreview, this, optionStore, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions));
241
Items.Add(new CheckBoxEnumFlagsOptionViewModel<NewLineBeforeOpenBracePlacement>(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.ControlBlocks, CSharpVSResources.Place_open_brace_on_new_line_for_control_blocks, s_forBlockPreview, this, optionStore, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions));
242
Items.Add(new CheckBoxEnumFlagsOptionViewModel<NewLineBeforeOpenBracePlacement>(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.AnonymousTypes, CSharpVSResources.Place_open_brace_on_new_line_for_anonymous_types, s_anonymousTypePreview, this, optionStore, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions));
243
Items.Add(new CheckBoxEnumFlagsOptionViewModel<NewLineBeforeOpenBracePlacement>(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, CSharpVSResources.Place_open_brace_on_new_line_for_object_collection_array_and_with_initializers, s_InitializerPreviewTrue, s_InitializerPreviewFalse, this, optionStore, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions));
244
Items.Add(new CheckBoxEnumFlagsOptionViewModel<NewLineBeforeOpenBracePlacement>(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.LambdaExpressionBody, CSharpVSResources.Place_open_brace_on_new_line_for_lambda_expression, s_lambdaPreview, this, optionStore, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions));
248
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.NewLineForElse, CSharpVSResources.Place_else_on_new_line, s_ifElsePreview, this, optionStore));
249
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.NewLineForCatch, CSharpVSResources.Place_catch_on_new_line, s_tryCatchFinallyPreview, this, optionStore));
250
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.NewLineForFinally, CSharpVSResources.Place_finally_on_new_line, s_tryCatchFinallyPreview, this, optionStore));
254
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.NewLineForMembersInObjectInit, CSharpVSResources.Place_members_in_object_initializers_on_new_line, s_objectInitializerPreview, this, optionStore));
255
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.NewLineForMembersInAnonymousTypes, CSharpVSResources.Place_members_in_anonymous_types_on_new_line, s_anonymousTypePreview, this, optionStore));
256
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.NewLineForClausesInQuery, CSharpVSResources.Place_query_expression_clauses_on_new_line, s_queryExpressionPreview, this, optionStore));
Options\Formatting\SpacingViewModel.cs (26)
128
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName, CSharpVSResources.Insert_space_between_method_name_and_its_opening_parenthesis, s_methodPreview, this, optionStore));
129
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceWithinMethodDeclarationParenthesis, CSharpVSResources.Insert_space_within_parameter_list_parentheses, s_methodPreview, this, optionStore));
130
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodDeclarationParentheses, CSharpVSResources.Insert_space_within_empty_parameter_list_parentheses, s_methodPreview, this, optionStore));
134
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceAfterMethodCallName, CSharpVSResources.Insert_space_between_called_method_name_and_its_opening_parenthesis, s_methodPreview, this, optionStore));
135
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceWithinMethodCallParentheses, CSharpVSResources.Insert_space_within_argument_list_parentheses, s_methodPreview, this, optionStore));
136
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceBetweenEmptyMethodCallParentheses, CSharpVSResources.Insert_space_within_empty_argument_list_parentheses, s_methodPreview, this, optionStore));
140
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceAfterControlFlowStatementKeyword, CSharpVSResources.Insert_space_after_keywords_in_control_flow_statements, s_forDelimiterPreview, this, optionStore));
143
Items.Add(new CheckBoxEnumFlagsOptionViewModel<SpacePlacementWithinParentheses>(
CSharpFormattingOptions2
.SpaceBetweenParentheses, (int)SpacePlacementWithinParentheses.Expressions, CSharpVSResources.Insert_space_within_parentheses_of_expressions, s_expressionPreview, this, optionStore, spaceBetweenParenthesesStorage, s_spaceBetweenParenthesesConversions));
144
Items.Add(new CheckBoxEnumFlagsOptionViewModel<SpacePlacementWithinParentheses>(
CSharpFormattingOptions2
.SpaceBetweenParentheses, (int)SpacePlacementWithinParentheses.TypeCasts, CSharpVSResources.Insert_space_within_parentheses_of_type_casts, s_castPreview, this, optionStore, spaceBetweenParenthesesStorage, s_spaceBetweenParenthesesConversions));
145
Items.Add(new CheckBoxEnumFlagsOptionViewModel<SpacePlacementWithinParentheses>(
CSharpFormattingOptions2
.SpaceBetweenParentheses, (int)SpacePlacementWithinParentheses.ControlFlowStatements, CSharpVSResources.Insert_spaces_within_parentheses_of_control_flow_statements, s_forDelimiterPreview, this, optionStore, spaceBetweenParenthesesStorage, s_spaceBetweenParenthesesConversions));
147
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceAfterCast, CSharpVSResources.Insert_space_after_cast, s_castPreview, this, optionStore));
148
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpacesIgnoreAroundVariableDeclaration, CSharpVSResources.Ignore_spaces_in_declaration_statements, s_declarationSpacingPreview, this, optionStore));
152
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceBeforeOpenSquareBracket, CSharpVSResources.Insert_space_before_open_square_bracket, s_bracketPreview, this, optionStore));
153
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceBetweenEmptySquareBrackets, CSharpVSResources.Insert_space_within_empty_square_brackets, s_bracketPreview, this, optionStore));
154
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceWithinSquareBrackets, CSharpVSResources.Insert_spaces_within_square_brackets, s_bracketPreview, this, optionStore));
158
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceAfterColonInBaseTypeDeclaration, CSharpVSResources.Insert_space_after_colon_for_base_or_interface_in_type_declaration, s_baseColonPreview, this, optionStore));
159
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceAfterComma, CSharpVSResources.Insert_space_after_comma, s_delimiterPreview, this, optionStore));
160
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceAfterDot, CSharpVSResources.Insert_space_after_dot, s_delimiterPreview, this, optionStore));
161
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceAfterSemicolonsInForStatement, CSharpVSResources.Insert_space_after_semicolon_in_for_statement, s_forDelimiterPreview, this, optionStore));
162
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceBeforeColonInBaseTypeDeclaration, CSharpVSResources.Insert_space_before_colon_for_base_or_interface_in_type_declaration, s_baseColonPreview, this, optionStore));
163
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceBeforeComma, CSharpVSResources.Insert_space_before_comma, s_delimiterPreview, this, optionStore));
164
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceBeforeDot, CSharpVSResources.Insert_space_before_dot, s_delimiterPreview, this, optionStore));
165
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.SpaceBeforeSemicolonsInForStatement, CSharpVSResources.Insert_space_before_semicolon_in_for_statement, s_forDelimiterPreview, this, optionStore));
169
Items.Add(new RadioButtonViewModel<BinaryOperatorSpacingOptionsInternal>(CSharpVSResources.Ignore_spaces_around_binary_operators, s_expressionSpacingPreview, "binary", BinaryOperatorSpacingOptionsInternal.Ignore,
CSharpFormattingOptions2
.SpacingAroundBinaryOperator, this, OptionStore));
170
Items.Add(new RadioButtonViewModel<BinaryOperatorSpacingOptionsInternal>(CSharpVSResources.Remove_spaces_before_and_after_binary_operators, s_expressionSpacingPreview, "binary", BinaryOperatorSpacingOptionsInternal.Remove,
CSharpFormattingOptions2
.SpacingAroundBinaryOperator, this, OptionStore));
171
Items.Add(new RadioButtonViewModel<BinaryOperatorSpacingOptionsInternal>(CSharpVSResources.Insert_space_before_and_after_binary_operators, s_expressionSpacingPreview, "binary", BinaryOperatorSpacingOptionsInternal.Single,
CSharpFormattingOptions2
.SpacingAroundBinaryOperator, this, OptionStore));
Options\Formatting\WrappingViewModel.cs (2)
41
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.WrappingPreserveSingleLine, CSharpVSResources.Leave_block_on_single_line, s_blockPreview, this, optionStore));
42
Items.Add(new CheckBoxOptionViewModel(
CSharpFormattingOptions2
.WrappingKeepStatementsOnSingleLine, CSharpVSResources.Leave_statements_and_member_declarations_on_the_same_line, s_declarationPreview, this, optionStore));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (5)
EditorConfigSettings\DataProvider\DataProviderTests.cs (1)
209
AssertEx.SetEqual(
CSharpFormattingOptions2
.EditorConfigOptions, optionsForSettings);
Options\OptionViewModelTests.cs (4)
77
workspace.GlobalOptions.SetGlobalOption(
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName, true);
82
var checkbox = viewModel.Items.OfType<CheckBoxOptionViewModel>().Where(c => c.Option ==
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName).First();
94
var checkbox = viewModel.Items.OfType<CheckBoxOptionViewModel>().Where(c => c.Option ==
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName).First();
98
Assert.NotEqual(optionStore.GetOption(
CSharpFormattingOptions2
.SpacingAfterMethodDeclarationName), initial);
Roslyn.VisualStudio.Next.UnitTests (7)
Options\VisualStudioSettingsOptionPersisterTests.cs (3)
115
var optionKey = new OptionKey2(
CSharpFormattingOptions2
.NewLineBeforeOpenBrace);
126
Assert.Equal(value,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue & ~NewLineBeforeOpenBracePlacement.AnonymousTypes);
139
Assert.Equal((optionKey,
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue & ~NewLineBeforeOpenBracePlacement.Methods), refreshedOptions.Single());
Options\VisualStudioStorageReadFallbackTests.cs (4)
34
CSharpFormattingOptions2
.SpaceBetweenParentheses.DefaultValue & ~SpacePlacementWithinParentheses.Expressions);
39
CSharpFormattingOptions2
.SpaceBetweenParentheses.DefaultValue | SpacePlacementWithinParentheses.Expressions);
58
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue & ~NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers);
63
CSharpFormattingOptions2
.NewLineBeforeOpenBrace.DefaultValue | NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers);