21 references to PreferBracesPreference
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
234/// <see cref="PreferBracesPreference.WhenMultiline"/> preference due to the presence of braces on one or more
Microsoft.CodeAnalysis.CSharp.Workspaces (20)
Simplification\Reducers\CSharpMiscellaneousReducer.cs (3)
131case PreferBracesPreference.Always: 135case PreferBracesPreference.WhenMultiline: 169case PreferBracesPreference.None:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
135public static readonly Option2<CodeStyleOption2<PreferBracesPreference>> PreferBraces = CreateOption(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions_Parsing.cs (13)
105private static CodeStyleOption2<PreferBracesPreference> ParsePreferBracesPreference( 107CodeStyleOption2<PreferBracesPreference> defaultValue) 118? new CodeStyleOption2<PreferBracesPreference>(PreferBracesPreference.Always, notificationOption) 119: new CodeStyleOption2<PreferBracesPreference>(PreferBracesPreference.None, notificationOption); 124return new CodeStyleOption2<PreferBracesPreference>(PreferBracesPreference.WhenMultiline, notificationOption); 131private static string GetPreferBracesPreferenceEditorConfigString(CodeStyleOption2<PreferBracesPreference> value, CodeStyleOption2<PreferBracesPreference> defaultValue) 136PreferBracesPreference.None => $"false{notificationString}", 137PreferBracesPreference.WhenMultiline => $"when_multiline{notificationString}", 138PreferBracesPreference.Always => $"true{notificationString}",
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\CSharpSimplifierOptions.cs (3)
18private static readonly CodeStyleOption2<PreferBracesPreference> s_defaultPreferBraces = 19new(PreferBracesPreference.Always, NotificationOption2.Silent); 29[DataMember] public CodeStyleOption2<PreferBracesPreference> PreferBraces { get; init; } = s_defaultPreferBraces;