65 references to Always
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
CodeActions\InitializeParameter\AddParameterCheckTests.cs (4)
2465
{ CSharpCodeStyleOptions.PreferBraces, PreferBracesPreference.
Always
},
2567
{ CSharpCodeStyleOptions.PreferBraces, PreferBracesPreference.
Always
},
2687
{ CSharpCodeStyleOptions.PreferBraces, PreferBracesPreference.
Always
},
2807
{ CSharpCodeStyleOptions.PreferBraces, PreferBracesPreference.
Always
},
Microsoft.CodeAnalysis.CSharp.Features (2)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
173
var useBlock = ((CSharpSimplifierOptions)this.ExtractMethodGenerationOptions.SimplifierOptions).PreferBraces.Value == CodeAnalysis.CodeStyle.PreferBracesPreference.
Always
;
InitializeParameter\CSharpAddParameterCheckCodeRefactoringProvider.cs (1)
61
var withBlock = options.PreferBraces.Value == CodeAnalysis.CodeStyle.PreferBracesPreference.
Always
;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (52)
src\Analyzers\CSharp\Tests\AddBraces\AddBracesTests.cs (52)
33
[InlineData((int)PreferBracesPreference.
Always
)]
53
[InlineData((int)PreferBracesPreference.
Always
)]
77
[InlineData((int)PreferBracesPreference.
Always
)]
97
[InlineData((int)PreferBracesPreference.
Always
)]
117
[InlineData((int)PreferBracesPreference.
Always
)]
137
[InlineData((int)PreferBracesPreference.
Always
)]
157
[InlineData((int)PreferBracesPreference.
Always
)]
178
[InlineData((int)PreferBracesPreference.
Always
)]
206
[InlineData((int)PreferBracesPreference.
Always
)]
241
[InlineData((int)PreferBracesPreference.
Always
)]
262
[InlineData((int)PreferBracesPreference.
Always
)]
283
[InlineData((int)PreferBracesPreference.
Always
)]
303
[InlineData((int)PreferBracesPreference.
Always
, true)]
336
[InlineData((int)PreferBracesPreference.
Always
, true)]
367
[InlineData((int)PreferBracesPreference.
Always
, true)]
385
[InlineData((int)PreferBracesPreference.
Always
, true)]
418
[InlineData((int)PreferBracesPreference.
Always
, true)]
451
[InlineData((int)PreferBracesPreference.
Always
, true)]
483
[InlineData((int)PreferBracesPreference.
Always
, true)]
516
[InlineData((int)PreferBracesPreference.
Always
, true)]
557
[InlineData((int)PreferBracesPreference.
Always
, true)]
602
[InlineData((int)PreferBracesPreference.
Always
, true)]
646
[InlineData((int)PreferBracesPreference.
Always
, true)]
698
[InlineData((int)PreferBracesPreference.
Always
, true)]
742
[InlineData((int)PreferBracesPreference.
Always
, true)]
773
[InlineData((int)PreferBracesPreference.
Always
, true)]
808
[InlineData((int)PreferBracesPreference.
Always
, true)]
841
[InlineData((int)PreferBracesPreference.
Always
, true)]
875
[InlineData((int)PreferBracesPreference.
Always
, true)]
906
[InlineData((int)PreferBracesPreference.
Always
, true)]
937
[InlineData((int)PreferBracesPreference.
Always
, true)]
969
[InlineData((int)PreferBracesPreference.
Always
, true)]
1003
[InlineData((int)PreferBracesPreference.
Always
, true)]
1037
[InlineData((int)PreferBracesPreference.
Always
, true)]
1085
[InlineData((int)PreferBracesPreference.
Always
, true)]
1151
[InlineData((int)PreferBracesPreference.
Always
, true)]
1219
[InlineData((int)PreferBracesPreference.
Always
, true)]
1287
[InlineData((int)PreferBracesPreference.
Always
, true)]
1321
[InlineData((int)PreferBracesPreference.
Always
, true)]
1361
[InlineData((int)PreferBracesPreference.
Always
)]
1383
[InlineData((int)PreferBracesPreference.
Always
)]
1405
[InlineData((int)PreferBracesPreference.
Always
)]
1429
[InlineData((int)PreferBracesPreference.
Always
, true)]
1472
[InlineData((int)PreferBracesPreference.
Always
, true)]
1515
[InlineData((int)PreferBracesPreference.
Always
, true)]
1558
[InlineData((int)PreferBracesPreference.
Always
, true)]
1601
[InlineData((int)PreferBracesPreference.
Always
, true)]
1648
[InlineData((int)PreferBracesPreference.
Always
, true)]
1695
[InlineData((int)PreferBracesPreference.
Always
, true)]
1734
[InlineData((int)PreferBracesPreference.
Always
, true)]
1773
[InlineData((int)PreferBracesPreference.
Always
, true)]
1814
[InlineData((int)PreferBracesPreference.
Always
, true)]
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Simplification\Reducers\CSharpMiscellaneousReducer.cs (1)
131
case PreferBracesPreference.
Always
:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions_Parsing.cs (2)
119
? new CodeStyleOption2<PreferBracesPreference>(PreferBracesPreference.
Always
, notificationOption)
139
PreferBracesPreference.
Always
=> $"true{notificationString}",
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\PreferBracesPreference.cs (1)
49
/// <item><description>Braces may be omitted in the cases described for <see cref="
Always
"/>.</description></item>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\CSharpSimplifierOptions.cs (1)
19
new(PreferBracesPreference.
Always
, NotificationOption2.Silent);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
EditorConfigSettings\DataProvider\CodeStyle\CSharpCodeStyleSettingsProvider.cs (1)
97
enumValues: [PreferBracesPreference.
Always
, PreferBracesPreference.None, PreferBracesPreference.WhenMultiline],
Options\Formatting\StyleViewModel.cs (1)
2378
var enumValues = new[] { PreferBracesPreference.
Always
, PreferBracesPreference.None, PreferBracesPreference.WhenMultiline };