21 references to PreferBracesPreference
Microsoft.CodeAnalysis.CSharp.CodeStyle (21)
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (3)
52if (option.Value == PreferBracesPreference.None || 97if (option.Value == PreferBracesPreference.WhenMultiline 234/// <see cref="PreferBracesPreference.WhenMultiline"/> preference due to the presence of braces on one or more
src\Analyzers\CSharp\Analyzers\CodeStyle\CSharpAnalyzerOptionsProvider.cs (1)
29public CodeStyleOption2<PreferBracesPreference> PreferBraces => GetOption(CSharpCodeStyleOptions.PreferBraces);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
139public 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;