21 references to PreferBraces
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
25
CSharpCodeStyleOptions.
PreferBraces
,
src\Analyzers\CSharp\Analyzers\CodeStyle\CSharpAnalyzerOptionsProvider.cs (1)
29
public CodeStyleOption2<PreferBracesPreference> PreferBraces => GetOption(CSharpCodeStyleOptions.
PreferBraces
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\PreferBracesPreference.cs (1)
13
/// Defines the known values for <see cref="CSharpCodeStyleOptions.
PreferBraces
"/>.
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\CSharpSimplifierOptions.cs (1)
47
PreferBraces = options.GetOption(CSharpCodeStyleOptions.
PreferBraces
);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (17)
src\Analyzers\CSharp\Tests\AddBraces\AddBracesTests.cs (17)
48
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
72
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
92
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
112
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
132
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
152
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
173
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
201
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
236
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
257
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
278
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
298
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
1378
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
1400
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
1424
new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent)));
1856
await TestInRegularAndScriptAsync(initialMarkup, expectedMarkup, options: Option(CSharpCodeStyleOptions.
PreferBraces
, bracesPreference, NotificationOption2.Silent));
1860
await TestMissingInRegularAndScriptAsync(initialMarkup, new TestParameters(options: Option(CSharpCodeStyleOptions.
PreferBraces
, bracesPreference, NotificationOption2.Silent)));