14 references to ParenthesesPreference
Microsoft.CodeAnalysis.Workspaces (14)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (14)
243private static readonly BidirectionalMap<string, ParenthesesPreference> s_parenthesesPreferenceMap = 246KeyValuePairUtil.Create("always_for_clarity", ParenthesesPreference.AlwaysForClarity), 247KeyValuePairUtil.Create("never_if_unnecessary", ParenthesesPreference.NeverIfUnnecessary), 250private static PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>> CreateParenthesesOption(CodeStyleOption2<ParenthesesPreference> defaultValue, string name) 261return new CodeStyleOption2<ParenthesesPreference>(s_parenthesesPreferenceMap.GetValueOrDefault(value), notification); 269var value = s_parenthesesPreferenceMap.GetKeyOrDefault(option.Value) ?? s_parenthesesPreferenceMap.GetKeyOrDefault(ParenthesesPreference.AlwaysForClarity); 273private static readonly CodeStyleOption2<ParenthesesPreference> s_alwaysForClarityPreference = 274new(ParenthesesPreference.AlwaysForClarity, NotificationOption2.Silent); 276internal static readonly PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>> ArithmeticBinaryParentheses = 281internal static readonly PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>> OtherBinaryParentheses = 286internal static readonly PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>> RelationalBinaryParentheses = 291internal static readonly PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>> OtherParentheses = 293defaultValue: new(ParenthesesPreference.NeverIfUnnecessary, NotificationOption2.Silent),