12 instantiations of PerLanguageOption2
Microsoft.CodeAnalysis.CodeStyle (12)
CodeStyleHelpers.cs (1)
148var option = new PerLanguageOption2<CodeStyleOption2<T>>(name, defaultValue, group, isEditorConfigOption: true, serializer: (serializerFactory ?? EditorConfigValueSerializer.CodeStyle).Invoke(defaultValue));
CodeStyleOptions2.cs (1)
316internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferSystemHashCode = new(
FadingOptions.cs (2)
12public static readonly PerLanguageOption2<bool> FadeOutUnusedImports = new("dotnet_fade_out_unused_imports", defaultValue: true); 13public static readonly PerLanguageOption2<bool> FadeOutUnreachableCode = new("dotnet_fade_out_unreachable_code", defaultValue: true);
FormattingOptions2.cs (5)
27public static PerLanguageOption2<bool> UseTabs = new PerLanguageOption2<bool>( 32public static PerLanguageOption2<int> TabSize = new PerLanguageOption2<int>( 36public static PerLanguageOption2<int> IndentationSize = new PerLanguageOption2<int>( 40public static PerLanguageOption2<string> NewLine = new PerLanguageOption2<string>( 62public static PerLanguageOption2<IndentStyle> SmartIndent = new PerLanguageOption2<IndentStyle>(
GenerationOptions.cs (2)
15public static readonly PerLanguageOption2<bool> PlaceSystemNamespaceFirst = new( 21public static readonly PerLanguageOption2<bool> SeparateImportDirectiveGroups = new(
NamingStyleOptions.cs (1)
24internal static PerLanguageOption2<NamingStylePreferences> NamingPreferences { get; } = new(
104 references to PerLanguageOption2
Microsoft.CodeAnalysis.CodeStyle (70)
AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer.cs (7)
42PerLanguageOption2<bool>? fadingOption, 74PerLanguageOption2<bool>? fadingOption, 88protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<DiagnosticDescriptor> descriptors, PerLanguageOption2<bool> fadingOption) 103protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableDictionary<DiagnosticDescriptor, IOption2> supportedDiagnosticsWithOptions, PerLanguageOption2<bool>? fadingOption) 112protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableDictionary<DiagnosticDescriptor, ImmutableHashSet<IOption2>> supportedDiagnosticsWithOptions, PerLanguageOption2<bool>? fadingOption) 118private static void AddDiagnosticIdToFadingOptionMapping(string diagnosticId, PerLanguageOption2<bool>? fadingOption) 126private static void AddDescriptorsToFadingOptionMapping(IEnumerable<DiagnosticDescriptor> descriptors, PerLanguageOption2<bool>? fadingOption)
AbstractUseConditionalExpressionDiagnosticAnalyzer.cs (1)
25PerLanguageOption2<CodeStyleOption2<bool>> option)
AnalyzerOptionsProvider.cs (1)
104private TValue GetOption<TValue>(PerLanguageOption2<TValue> option, TValue defaultValue)
CodeStyleHelpers.cs (2)
141public static PerLanguageOption2<CodeStyleOption2<T>> CreatePerLanguageEditorConfigOption<T>( 148var option = new PerLanguageOption2<CodeStyleOption2<T>>(name, defaultValue, group, isEditorConfigOption: true, serializer: (serializerFactory ?? EditorConfigValueSerializer.CodeStyle).Invoke(defaultValue));
CodeStyleOptions2.cs (34)
22private static PerLanguageOption2<CodeStyleOption2<T>> CreatePerLanguageOption<T>( 34private static PerLanguageOption2<CodeStyleOption2<bool>> CreateQualifyAccessOption(string name) 40public static readonly PerLanguageOption2<CodeStyleOption2<bool>> QualifyFieldAccess = CreateQualifyAccessOption( 47public static readonly PerLanguageOption2<CodeStyleOption2<bool>> QualifyPropertyAccess = CreateQualifyAccessOption( 54public static readonly PerLanguageOption2<CodeStyleOption2<bool>> QualifyMethodAccess = CreateQualifyAccessOption( 61public static readonly PerLanguageOption2<CodeStyleOption2<bool>> QualifyEventAccess = CreateQualifyAccessOption( 68public static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferIntrinsicPredefinedTypeKeywordInDeclaration = CreatePerLanguageOption( 77public static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferIntrinsicPredefinedTypeKeywordInMemberAccess = CreatePerLanguageOption( 83internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferObjectInitializer = CreatePerLanguageOption( 88internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferCollectionInitializer = CreatePerLanguageOption( 93internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferSimplifiedBooleanExpressions = CreatePerLanguageOption( 106internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferCoalesceExpression = CreatePerLanguageOption( 111internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferNullPropagation = CreatePerLanguageOption( 116internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferExplicitTupleNames = CreatePerLanguageOption( 121internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferAutoProperties = CreatePerLanguageOption( 126internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferInferredTupleNames = CreatePerLanguageOption( 131internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferInferredAnonymousTypeMemberNames = CreatePerLanguageOption( 136internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferIsNullCheckOverReferenceEqualityMethod = CreatePerLanguageOption( 141internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferConditionalExpressionOverAssignment = CreatePerLanguageOption( 146internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferConditionalExpressionOverReturn = CreatePerLanguageOption( 151internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferCompoundAssignment = CreatePerLanguageOption( 156internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferSimplifiedInterpolation = CreatePerLanguageOption( 168internal static readonly PerLanguageOption2<CodeStyleOption2<UnusedParametersPreference>> UnusedParameters = CreatePerLanguageOption( 198internal static readonly PerLanguageOption2<CodeStyleOption2<AccessibilityModifiersRequired>> AccessibilityModifiersRequired = CreatePerLanguageOption( 218internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferReadonly = CreatePerLanguageOption( 242private static PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>> CreateParenthesesOption(CodeStyleOption2<ParenthesesPreference> defaultValue, string name) 265internal static readonly PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>> ArithmeticBinaryParentheses = 270internal static readonly PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>> OtherBinaryParentheses = 275internal static readonly PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>> RelationalBinaryParentheses = 280internal static readonly PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>> OtherParentheses = 316internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferSystemHashCode = new( 321public static readonly PerLanguageOption2<CodeStyleOption2<bool>> PreferNamespaceAndFolderMatchStructure = CreatePerLanguageOption( 326internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> AllowMultipleBlankLines = CreatePerLanguageOption( 331internal static readonly PerLanguageOption2<CodeStyleOption2<bool>> AllowStatementImmediatelyAfterBlock = CreatePerLanguageOption(
FadingOptions.cs (2)
12public static readonly PerLanguageOption2<bool> FadeOutUnusedImports = new("dotnet_fade_out_unused_imports", defaultValue: true); 13public static readonly PerLanguageOption2<bool> FadeOutUnreachableCode = new("dotnet_fade_out_unreachable_code", defaultValue: true);
FormattingOptions2.cs (5)
27public static PerLanguageOption2<bool> UseTabs = new PerLanguageOption2<bool>( 32public static PerLanguageOption2<int> TabSize = new PerLanguageOption2<int>( 36public static PerLanguageOption2<int> IndentationSize = new PerLanguageOption2<int>( 40public static PerLanguageOption2<string> NewLine = new PerLanguageOption2<string>( 62public static PerLanguageOption2<IndentStyle> SmartIndent = new PerLanguageOption2<IndentStyle>(
GenerationOptions.cs (2)
15public static readonly PerLanguageOption2<bool> PlaceSystemNamespaceFirst = new( 21public static readonly PerLanguageOption2<bool> SeparateImportDirectiveGroups = new(
IDEDiagnosticIdToOptionMappingHelper.cs (4)
25private static readonly ConcurrentDictionary<string, PerLanguageOption2<bool>> s_diagnosticIdToFadingOptionMap = new(); 32public static bool TryGetMappedFadingOption(string diagnosticId, [NotNullWhen(true)] out PerLanguageOption2<bool>? fadingOption) 94public static void AddFadingOptionMapping(string diagnosticId, PerLanguageOption2<bool> fadingOption) 101Debug.Assert(!s_diagnosticIdToFadingOptionMap.TryGetValue(diagnosticId, out var existingOption) || existingOption.Equals(fadingOption));
IOptionReader.cs (3)
43public static T GetOption<T>(this IOptionsReader options, PerLanguageOption2<T> option, string language) 46public static T GetOption<T>(this IOptionsReader options, PerLanguageOption2<T> option, string language, T defaultValue) 52public static T GetOptionValue<T>(this IOptionsReader options, PerLanguageOption2<CodeStyleOption2<T>> option, string language, T defaultValue)
IPublicOption.cs (1)
11/// to distinguish them from internal ones (<see cref="Option2{T}"/> and <see cref="PerLanguageOption2{T}"/>).
NamingStyleOptions.cs (1)
24internal static PerLanguageOption2<NamingStylePreferences> NamingPreferences { get; } = new(
PerLanguageOption2.cs (1)
12/// Marker interface for <see cref="PerLanguageOption2{T}"/>.
PublicOptionFactory.cs (6)
22public static PerLanguageOption2<T> WithPublicOption<T, TPublicValue>(this PerLanguageOption2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue) 31public static PerLanguageOption2<T> WithPublicOption<T>(this PerLanguageOption2<T> option, string feature, string name) 34public static PerLanguageOption2<CodeStyleOption2<T>> WithPublicOption<T>(this PerLanguageOption2<CodeStyleOption2<T>> option, string feature, string name)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
CodeFixOptionsProvider.cs (1)
61private TValue GetOption<TValue>(PerLanguageOption2<TValue> option, TValue defaultValue)
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (10)
OptionsCollection.cs (3)
55public void Add<T>(PerLanguageOption2<T> option, T value) 58public void Add<T>(PerLanguageOption2<CodeStyleOption2<T>> option, T value) 61public void Add<T>(PerLanguageOption2<CodeStyleOption2<T>> option, T value, NotificationOption2 notification)
ParenthesesOptionsProvider.cs (7)
32private static IEnumerable<PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>>> GetAllExceptOtherParenthesesOptions() 48private static IEnumerable<PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>>> GetAllParenthesesOptions() 56foreach (var option in GetAllParenthesesOptions()) 70foreach (var option in GetAllParenthesesOptions()) 84foreach (var option in GetAllExceptOtherParenthesesOptions()) 94private OptionsCollection GetSingleRequireOption(PerLanguageOption2<CodeStyleOption2<ParenthesesPreference>> option) 97foreach (var o in GetAllParenthesesOptions())
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
CSharpCodeFixOptionsProvider.cs (1)
83private TValue GetOption<TValue>(PerLanguageOption2<TValue> option, TValue defaultValue)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (11)
AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest_OptionHelpers.cs (7)
18internal (OptionKey2, object) SingleOption<T>(PerLanguageOption2<T> option, T value) 27internal (OptionKey2, object) SingleOption<T>(PerLanguageOption2<CodeStyleOption2<T>> option, T enabled, NotificationOption2 notification) 30internal (OptionKey2, object) SingleOption<T>(PerLanguageOption2<CodeStyleOption2<T>> option, CodeStyleOption2<T> codeStyle) 33internal static (OptionKey2, object) SingleOption<T>(PerLanguageOption2<CodeStyleOption2<T>> option, CodeStyleOption2<T> codeStyle, string language) 42internal OptionsCollection Option<T>(PerLanguageOption2<CodeStyleOption2<T>> option, T enabled, NotificationOption2 notification) 45internal OptionsCollection Option<T>(PerLanguageOption2<CodeStyleOption2<T>> option, CodeStyleOption2<T> codeStyle) 51internal OptionsCollection Option<T>(PerLanguageOption2<T> option, T value)
QualifyMemberAccessTests.cs (4)
30private Task TestAsyncWithOption(string code, string expected, PerLanguageOption2<CodeStyleOption2<bool>> option) 33private Task TestAsyncWithOptionAndNotificationOption(string code, string expected, PerLanguageOption2<CodeStyleOption2<bool>> option, NotificationOption2 notification) 36private Task TestMissingAsyncWithOption(string code, PerLanguageOption2<CodeStyleOption2<bool>> option) 39private Task TestMissingAsyncWithOptionAndNotificationOption(string code, PerLanguageOption2<CodeStyleOption2<bool>> option, NotificationOption2 notification)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (11)
AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest_OptionHelpers.vb (7)
16Friend Function SingleOption(Of T)(optionParam As PerLanguageOption2(Of T), value As T) As (OptionKey2, Object) 28Friend Function SingleOption(Of T)(optionParam As PerLanguageOption2(Of CodeStyleOption2(Of T)), enabled As T, notification As NotificationOption2) As (OptionKey2, Object) 32Friend Function SingleOption(Of T)(optionParam As PerLanguageOption2(Of CodeStyleOption2(Of T)), codeStyle As CodeStyleOption2(Of T)) As (OptionKey2, Object) 36Friend Shared Function SingleOption(Of T)(optionParam As PerLanguageOption2(Of CodeStyleOption2(Of T)), codeStyle As CodeStyleOption2(Of T), language As String) As (OptionKey2, Object) 48Friend Function [Option](Of T)(optionParam As PerLanguageOption2(Of CodeStyleOption2(Of T)), enabled As T, notification As NotificationOption2) As OptionsCollection 52Friend Function [Option](Of T)(optionParam As PerLanguageOption2(Of CodeStyleOption2(Of T)), codeStyle As CodeStyleOption2(Of T)) As OptionsCollection 60Friend Function [Option](Of T)(optionParam As PerLanguageOption2(Of T), value As T) As OptionsCollection
QualifyMemberAccessTests.vb (4)
22Private Function TestAsyncWithOption(code As String, expected As String, opt As PerLanguageOption2(Of CodeStyleOption2(Of Boolean))) As Task 26Private Function TestAsyncWithOptionAndNotification(code As String, expected As String, opt As PerLanguageOption2(Of CodeStyleOption2(Of Boolean)), notification As NotificationOption2) As Task 30Private Function TestMissingAsyncWithOption(code As String, opt As PerLanguageOption2(Of CodeStyleOption2(Of Boolean))) As Task 34Private Function TestMissingAsyncWithOptionAndNotification(code As String, opt As PerLanguageOption2(Of CodeStyleOption2(Of Boolean)), notification As NotificationOption2) As Task