3 interfaces inheriting from IOption2
Microsoft.CodeAnalysis.CodeStyle (3)
IPublicOption.cs (1)
13
internal interface IPublicOption :
IOption2
Option2.cs (1)
15
internal interface ISingleValuedOption :
IOption2
PerLanguageOption2.cs (1)
15
internal interface IPerLanguageValuedOption :
IOption2
76 references to IOption2
Microsoft.CodeAnalysis.CodeStyle (64)
AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs (8)
20
/// unique <see cref="
IOption2
"/> code style option.
38
IOption2
? option,
50
/// two or more <see cref="
IOption2
"/> code style options.
67
ImmutableHashSet<
IOption2
> options,
82
protected AbstractBuiltInCodeStyleDiagnosticAnalyzer(ImmutableDictionary<DiagnosticDescriptor,
IOption2
> supportedDiagnosticsWithOptions)
92
protected AbstractBuiltInCodeStyleDiagnosticAnalyzer(ImmutableDictionary<DiagnosticDescriptor, ImmutableHashSet<
IOption2
>> supportedDiagnosticsWithOptions)
104
private static void AddDiagnosticIdToOptionMapping(string diagnosticId,
IOption2
? option)
112
private static void AddDiagnosticIdToOptionMapping(string diagnosticId, ImmutableHashSet<
IOption2
> options)
AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer.cs (4)
41
IOption2
? option,
73
ImmutableHashSet<
IOption2
> options,
103
protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableDictionary<DiagnosticDescriptor,
IOption2
> supportedDiagnosticsWithOptions, PerLanguageOption2<bool>? fadingOption)
112
protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableDictionary<DiagnosticDescriptor, ImmutableHashSet<
IOption2
>> supportedDiagnosticsWithOptions, PerLanguageOption2<bool>? fadingOption)
AbstractFileHeaderDiagnosticAnalyzer.cs (1)
27
: base(ImmutableDictionary<DiagnosticDescriptor,
IOption2
>.Empty
AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
27
options: ImmutableHashSet.Create<
IOption2
>(CodeStyleOptions2.QualifyFieldAccess, CodeStyleOptions2.QualifyPropertyAccess, CodeStyleOptions2.QualifyMethodAccess, CodeStyleOptions2.QualifyEventAccess),
AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
95
: base(ImmutableDictionary<DiagnosticDescriptor,
IOption2
>.Empty
AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
53
: base(ImmutableDictionary<DiagnosticDescriptor,
IOption2
>.Empty
AbstractUseInferredMemberNameDiagnosticAnalyzer.cs (1)
20
options: ImmutableHashSet.Create<
IOption2
>(CodeStyleOptions2.PreferInferredAnonymousTypeMemberNames, CodeStyleOptions2.PreferInferredTupleNames),
AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
50
: base(ImmutableDictionary<DiagnosticDescriptor,
IOption2
>.Empty
AnalyzerConfigOptionsExtensions.cs (3)
18
public static T GetEditorConfigOption<T>(this AnalyzerConfigOptions analyzerConfigOptions,
IOption2
option, T defaultValue)
21
public static T GetEditorConfigOptionValue<T>(this AnalyzerConfigOptions analyzerConfigOptions,
IOption2
option, T defaultValue)
24
public static bool TryGetEditorConfigOption<T>(this AnalyzerConfigOptions analyzerConfigOptions,
IOption2
option, out T value)
CodeStyleHelpers.cs (3)
117
this ImmutableArray<
IOption2
>.Builder optionsBuilder,
130
this ImmutableArray<
IOption2
>.Builder optionsBuilder,
142
this ImmutableArray<
IOption2
>.Builder optionsBuilder,
CodeStyleOptions2.cs (3)
20
private static readonly ImmutableArray<
IOption2
>.Builder s_allOptionsBuilder = ImmutableArray.CreateBuilder<
IOption2
>();
336
internal static readonly ImmutableArray<
IOption2
> AllOptions = s_allOptionsBuilder.ToImmutable();
GenerationOptions.cs (2)
27
public static readonly ImmutableArray<
IOption2
> AllOptions = ImmutableArray.Create<
IOption2
>(
IDEDiagnosticIdToOptionMappingHelper.cs (10)
23
private static readonly ConcurrentDictionary<string, ImmutableHashSet<
IOption2
>> s_diagnosticIdToOptionMap = new();
24
private static readonly ConcurrentDictionary<string, ConcurrentDictionary<string, ImmutableHashSet<
IOption2
>>> s_diagnosticIdToLanguageSpecificOptionsMap = new();
27
public static bool TryGetMappedOptions(string diagnosticId, string language, [NotNullWhen(true)] out ImmutableHashSet<
IOption2
>? options)
39
public static void AddOptionMapping(string diagnosticId, ImmutableHashSet<
IOption2
> options)
45
var multipleLanguagesOptionsBuilder = ImmutableHashSet.CreateBuilder<
IOption2
>();
50
foreach (
var
perLanguageValuedOption in group)
64
foreach (
var
option in languageGroup)
71
var map = s_diagnosticIdToLanguageSpecificOptionsMap.GetOrAdd(language, _ => new ConcurrentDictionary<string, ImmutableHashSet<
IOption2
>>());
84
private static void AddOptionMapping(ConcurrentDictionary<string, ImmutableHashSet<
IOption2
>> map, string diagnosticId, ImmutableHashSet<
IOption2
> options)
InternalOptionStorageMapping.cs (2)
16
public
IOption2
InternalOption { get; }
18
public OptionStorageMapping(
IOption2
internalOption)
IOption2.cs (2)
13
/// This ensures that all the sub-types of <see cref="
IOption2
"/> in either layer see an identical
16
internal interface IOption2 : IEquatable<
IOption2
?>
Option2.cs (5)
42
internal Option2(OptionDefinition<T> definition, string? languageName, Func<
IOption2
, IPublicOption>? publicOptionFactory)
77
OptionDefinition
IOption2
.Definition => Definition;
80
bool
IOption2
.IsPerLanguage => false;
94
public override bool Equals(object? obj) => Equals(obj as
IOption2
);
96
public bool Equals(
IOption2
? other)
OptionKey2.cs (2)
18
public
IOption2
Option { get; }
21
public OptionKey2(
IOption2
option, string? language)
ParenthesesDiagnosticAnalyzersHelper.cs (2)
16
internal static ImmutableHashSet<
IOption2
> Options = ImmutableHashSet.Create<
IOption2
>(CodeStyleOptions2.ArithmeticBinaryParentheses, CodeStyleOptions2.RelationalBinaryParentheses, CodeStyleOptions2.OtherBinaryParentheses, CodeStyleOptions2.OtherParentheses);
PerLanguageOption2.cs (5)
33
internal PerLanguageOption2(OptionDefinition<T> optionDefinition, Func<
IOption2
, IPublicOption>? publicOptionFactory)
64
OptionDefinition
IOption2
.Definition => Definition;
68
bool
IOption2
.IsPerLanguage => true;
81
public override bool Equals(object? obj) => Equals(obj as
IOption2
);
83
public bool Equals(
IOption2
? other)
SimplifyTypeNamesDiagnosticAnalyzerBase.cs (4)
65
: base(ImmutableDictionary<DiagnosticDescriptor, ImmutableHashSet<
IOption2
>>.Empty
66
.Add(s_descriptorSimplifyNames, ImmutableHashSet<
IOption2
>.Empty)
67
.Add(s_descriptorSimplifyMemberAccess, ImmutableHashSet<
IOption2
>.Empty)
68
.Add(s_descriptorPreferBuiltinOrFrameworkType, ImmutableHashSet.Create<
IOption2
>(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess)),
VisualBasicCodeStyleOptions.cs (3)
16
private static readonly ImmutableArray<
IOption2
>.Builder s_allOptionsBuilder = ImmutableArray.CreateBuilder<
IOption2
>();
54
public static ImmutableArray<
IOption2
> AllOptions => s_allOptionsBuilder.ToImmutable();
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (1)
OptionsCollection.cs (1)
39
Debug.Assert(optionKey.Option is
IOption2
{ Definition.StorageMapping: null });
Microsoft.CodeAnalysis.CSharp.CodeStyle (11)
CSharpCodeStyleOptions.cs (3)
18
private static readonly ImmutableArray<
IOption2
>.Builder s_allOptionsBuilder = ImmutableArray.CreateBuilder<
IOption2
>();
255
internal static readonly ImmutableArray<
IOption2
> AllOptions = s_allOptionsBuilder.ToImmutable();
CSharpFormattingOptions2.cs (3)
22
private static readonly ImmutableArray<
IOption2
>.Builder s_allOptionsBuilder = ImmutableArray.CreateBuilder<
IOption2
>();
68
internal static ImmutableArray<
IOption2
> AllOptions { get; }
CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
28
ImmutableHashSet.Create<
IOption2
>(CSharpCodeStyleOptions.VarForBuiltInTypes, CSharpCodeStyleOptions.VarWhenTypeIsApparent, CSharpCodeStyleOptions.VarElsewhere),
MisplacedUsingDirectivesDiagnosticAnalyzer.cs (1)
41
: base(ImmutableDictionary<DiagnosticDescriptor,
IOption2
>.Empty
UseExpressionBodyDiagnosticAnalyzer.cs (2)
31
private static ImmutableDictionary<DiagnosticDescriptor,
IOption2
> GetSupportedDescriptorsWithOptions()
33
var builder = ImmutableDictionary.CreateBuilder<DiagnosticDescriptor,
IOption2
>();
UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
24
ImmutableDictionary<DiagnosticDescriptor, Options.
IOption2
>.Empty