12 types derived from AnalyzerConfigOptions
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
11internal sealed class DictionaryAnalyzerConfigOptions : AnalyzerConfigOptions
Microsoft.CodeAnalysis.CodeStyle (2)
src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
11internal sealed class DictionaryAnalyzerConfigOptions : AnalyzerConfigOptions
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
20internal abstract class StructuredAnalyzerConfigOptions : AnalyzerConfigOptions, IOptionsReader
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
EditorConfigSettings\Updater\SettingsUpdaterTests.TestAnalyzerConfigOptions.cs (1)
13private class TestAnalyzerConfigOptions : AnalyzerConfigOptions
Microsoft.CodeAnalysis.EditorFeatures (1)
Options\EditorAnalyzerConfigOptions.cs (1)
13internal sealed class EditorAnalyzerConfigOptions : AnalyzerConfigOptions
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EditorConfigSettings\Data\CodeStyleSettingsTest.cs (1)
101private class TestAnalyzerConfigOptions : AnalyzerConfigOptions
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueTestAnalyzerConfigOptions.cs (1)
12internal class EditAndContinueTestAnalyzerConfigOptions : AnalyzerConfigOptions
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
11internal sealed class DictionaryAnalyzerConfigOptions : AnalyzerConfigOptions
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
20internal abstract class StructuredAnalyzerConfigOptions : AnalyzerConfigOptions, IOptionsReader
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
GeneratorTests.cs (1)
184private sealed class Options : AnalyzerConfigOptions
Microsoft.Gen.MetricsReports.Unit.Tests (1)
GeneratorTests.cs (1)
174private sealed class Options : AnalyzerConfigOptions
System.Windows.Forms.Analyzers.CSharp.Tests (1)
CompilerAnalyzerConfigOptions.cs (1)
15internal sealed class CompilerAnalyzerConfigOptions : AnalyzerConfigOptions
146 references to AnalyzerConfigOptions
BuildActionTelemetryTable (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (5)
37AnalyzerConfigOptions? analyzerOptions, 74var analyzerConfigOptions = analyzerOptions.AnalyzerConfigOptionsProvider.GetOptions(tree); 97public static bool IsDefinedInEditorConfig(this DiagnosticDescriptor descriptor, AnalyzerConfigOptions analyzerConfigOptions) 147AnalyzerConfigOptions analyzerConfigOptions, 216AnalyzerConfigOptions analyzerOptions,
Microsoft.CodeAnalysis (18)
CommandLine\CommonCompiler.cs (1)
1022var builder = ImmutableDictionary.CreateBuilder<object, AnalyzerConfigOptions>();
DiagnosticAnalyzer\AnalyzerConfigOptionsProvider.cs (3)
15public abstract AnalyzerConfigOptions GlobalOptions { get; } 20public abstract AnalyzerConfigOptions GetOptions(SyntaxTree tree); 25public abstract AnalyzerConfigOptions GetOptions(AdditionalText textFile);
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
2315var options = AnalyzerExecutor.AnalyzerOptions.AnalyzerConfigOptionsProvider.GetOptions(tree);
DiagnosticAnalyzer\AnalyzerOptionsExtensions.cs (1)
61var analyzerConfigOptions = analyzerOptions.AnalyzerConfigOptionsProvider.GetOptions(tree);
DiagnosticAnalyzer\CompilerAnalyzerConfigOptionsProvider.cs (11)
11private readonly ImmutableDictionary<object, AnalyzerConfigOptions> _treeDict; 15ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, 19ImmutableDictionary<object, AnalyzerConfigOptions> treeDict, 20AnalyzerConfigOptions globalOptions) 26public override AnalyzerConfigOptions GlobalOptions { get; } 28public override AnalyzerConfigOptions GetOptions(SyntaxTree tree) 29=> _treeDict.TryGetValue(tree, out var options) ? options : DictionaryAnalyzerConfigOptions.Empty; 31public override AnalyzerConfigOptions GetOptions(AdditionalText textFile) 32=> _treeDict.TryGetValue(textFile, out var options) ? options : DictionaryAnalyzerConfigOptions.Empty; 34internal CompilerAnalyzerConfigOptionsProvider WithAdditionalTreeOptions(ImmutableDictionary<object, AnalyzerConfigOptions> treeDict) 37internal CompilerAnalyzerConfigOptionsProvider WithGlobalOptions(AnalyzerConfigOptions globalOptions)
SourceGeneration\GeneratedCodeUtilities.cs (1)
162internal static GeneratedKind GetGeneratedCodeKindFromOptions(AnalyzerConfigOptions options)
Microsoft.CodeAnalysis.CodeStyle (29)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (2)
192var globalOptions = analyzerOptions.AnalyzerConfigOptionsProvider.GlobalOptions; 193var treeOptions = analyzerOptions.AnalyzerConfigOptionsProvider.GetOptions(tree);
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
162internal static GeneratedKind GetGeneratedCodeKindFromOptions(AnalyzerConfigOptions options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (7)
17/// <see cref="AnalyzerConfigOptions"/> that memoize structured (parsed) form of certain complex options to avoid parsing them multiple times. 24private readonly AnalyzerConfigOptions _options; 28public Implementation(AnalyzerConfigOptions options, StructuredAnalyzerConfigOptions? fallback) 52public static StructuredAnalyzerConfigOptions Create(AnalyzerConfigOptions options, StructuredAnalyzerConfigOptions? fallback = null) 58public static bool TryGetStructuredOptions(AnalyzerConfigOptions configOptions, [NotNullWhen(true)] out StructuredAnalyzerConfigOptions? options) 87private static readonly ConditionalWeakTable<AnalyzerConfigOptions, StructuredAnalyzerConfigOptions> s_codeStyleStructuredOptions = new(); 90private static bool TryGetCorrespondingCodeStyleInstance(AnalyzerConfigOptions configOptions, [NotNullWhen(true)] out StructuredAnalyzerConfigOptions? options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigParser.cs (2)
21= ImmutableHashSet.CreateRange(AnalyzerConfigOptions.KeyComparer, [ 48var activeSectionProperties = ImmutableDictionary.CreateBuilder<string, (string value, TextLine? line)>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (5)
15public static T GetEditorConfigOption<T>(this AnalyzerConfigOptions analyzerConfigOptions, IOption2 option, T defaultValue) 18public static T GetEditorConfigOptionValue<T>(this AnalyzerConfigOptions analyzerConfigOptions, IOption2 option, T defaultValue) 21public static bool TryGetEditorConfigOption<T>(this AnalyzerConfigOptions analyzerConfigOptions, IOption2 option, out T value) 56public static bool IsCodeStyleSeverityEnabled(this AnalyzerConfigOptions analyzerConfigOptions) 65public static bool IsAnalysisLevelGreaterThanOrEquals(this AnalyzerConfigOptions analyzerConfigOptions, int minAnalysisLevel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (5)
37AnalyzerConfigOptions? analyzerOptions, 74var analyzerConfigOptions = analyzerOptions.AnalyzerConfigOptionsProvider.GetOptions(tree); 97public static bool IsDefinedInEditorConfig(this DiagnosticDescriptor descriptor, AnalyzerConfigOptions analyzerConfigOptions) 147AnalyzerConfigOptions analyzerConfigOptions, 216AnalyzerConfigOptions analyzerOptions,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
232var analyzerConfigOptions = analyzerOptions.AnalyzerConfigOptionsProvider.GetOptions(syntaxTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
18public static NamingStylePreferences ParseDictionary(AnalyzerConfigOptions allRawConventions) 103internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 105var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\IOptionReader.cs (3)
19internal sealed class AnalyzerConfigOptionsReader(AnalyzerConfigOptions options) : IOptionsReader 21public readonly AnalyzerConfigOptions Options = options; 29public static IOptionsReader GetOptionsReader(this AnalyzerConfigOptions configOptions)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
14640var globalOptions = gc.AnalyzerConfigOptions.GlobalOptions; 14651var classOptions = gc.AnalyzerConfigOptions.GetOptions(gc.Compilation.SyntaxTrees.First());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
1501var analyzerConfigOptionsPerTreeBuilder = ImmutableDictionary.CreateBuilder<object, AnalyzerConfigOptions>();
Diagnostics\GetDiagnosticsTests.cs (2)
560ImmutableDictionary<object, AnalyzerConfigOptions>.Empty.Add(compilation.SyntaxTrees.Single(), analyzerConfigOptions), 606ImmutableDictionary<object, AnalyzerConfigOptions>.Empty.Add(compilation.SyntaxTrees.Single(), analyzerConfigOptions),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
SourceGeneration\GeneratorDriverTests.cs (2)
855var options = new CompilerAnalyzerConfigOptionsProvider(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("a", "abc").Add("b", "def"))); 2630var optionsProvider = new CompilerAnalyzerConfigOptionsProvider(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, new DictionaryAnalyzerConfigOptions(builder.ToImmutable()));
Microsoft.CodeAnalysis.EditorFeatures (3)
EditorConfigSettings\Data\TieredAnalyzerConfigOptions.cs (2)
10internal sealed class TieredAnalyzerConfigOptions(AnalyzerConfigOptions editorConfigOptions, IGlobalOptionService globalOptions, string language, string editorConfigFileName) 12public readonly AnalyzerConfigOptions EditorConfigOptions = editorConfigOptions;
EditorConfigSettings\DataProvider\Analyzer\AnalyzerSettingsProvider.cs (1)
39private IEnumerable<AnalyzerSetting> GetSettings(AnalyzerReference analyzerReference, AnalyzerConfigOptions editorConfigOptions)
Microsoft.CodeAnalysis.Features (2)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (2)
192var globalOptions = analyzerOptions.AnalyzerConfigOptionsProvider.GlobalOptions; 193var treeOptions = analyzerOptions.AnalyzerConfigOptionsProvider.GetOptions(tree);
Microsoft.CodeAnalysis.Features.Test.Utilities (3)
EditAndContinue\EditAndContinueTestAnalyzerConfigOptionsProvider.cs (3)
15public override AnalyzerConfigOptions GlobalOptions { get; } 17public override AnalyzerConfigOptions GetOptions(SyntaxTree tree) 20public override AnalyzerConfigOptions GetOptions(AdditionalText textFile)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\Options\ClientFallbackAnalyzerConfigOptionsProvider.cs (1)
27var builder = ImmutableDictionary.CreateBuilder<string, string>(AnalyzerConfigOptions.KeyComparer);
Features\Options\SolutionAnalyzerConfigOptionsUpdater.cs (1)
75lazyBuilder = ImmutableDictionary.CreateBuilder<string, string>(AnalyzerConfigOptions.KeyComparer);
Microsoft.CodeAnalysis.Workspaces (32)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
162internal static GeneratedKind GetGeneratedCodeKindFromOptions(AnalyzerConfigOptions options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (5)
17/// <see cref="AnalyzerConfigOptions"/> that memoize structured (parsed) form of certain complex options to avoid parsing them multiple times. 24private readonly AnalyzerConfigOptions _options; 28public Implementation(AnalyzerConfigOptions options, StructuredAnalyzerConfigOptions? fallback) 52public static StructuredAnalyzerConfigOptions Create(AnalyzerConfigOptions options, StructuredAnalyzerConfigOptions? fallback = null) 58public static bool TryGetStructuredOptions(AnalyzerConfigOptions configOptions, [NotNullWhen(true)] out StructuredAnalyzerConfigOptions? options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigParser.cs (2)
21= ImmutableHashSet.CreateRange(AnalyzerConfigOptions.KeyComparer, [ 48var activeSectionProperties = ImmutableDictionary.CreateBuilder<string, (string value, TextLine? line)>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (5)
15public static T GetEditorConfigOption<T>(this AnalyzerConfigOptions analyzerConfigOptions, IOption2 option, T defaultValue) 18public static T GetEditorConfigOptionValue<T>(this AnalyzerConfigOptions analyzerConfigOptions, IOption2 option, T defaultValue) 21public static bool TryGetEditorConfigOption<T>(this AnalyzerConfigOptions analyzerConfigOptions, IOption2 option, out T value) 56public static bool IsCodeStyleSeverityEnabled(this AnalyzerConfigOptions analyzerConfigOptions) 65public static bool IsAnalysisLevelGreaterThanOrEquals(this AnalyzerConfigOptions analyzerConfigOptions, int minAnalysisLevel)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (5)
37AnalyzerConfigOptions? analyzerOptions, 74var analyzerConfigOptions = analyzerOptions.AnalyzerConfigOptionsProvider.GetOptions(tree); 97public static bool IsDefinedInEditorConfig(this DiagnosticDescriptor descriptor, AnalyzerConfigOptions analyzerConfigOptions) 147AnalyzerConfigOptions analyzerConfigOptions, 216AnalyzerConfigOptions analyzerOptions,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
232var analyzerConfigOptions = analyzerOptions.AnalyzerConfigOptionsProvider.GetOptions(syntaxTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
18public static NamingStylePreferences ParseDictionary(AnalyzerConfigOptions allRawConventions) 103internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 105var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\IOptionReader.cs (3)
19internal sealed class AnalyzerConfigOptionsReader(AnalyzerConfigOptions options) : IOptionsReader 21public readonly AnalyzerConfigOptions Options = options; 29public static IOptionsReader GetOptionsReader(this AnalyzerConfigOptions configOptions)
Workspace\Solution\AnalyzerConfigData.cs (1)
15private readonly AnalyzerConfigOptions _dictionaryConfigOptions;
Workspace\Solution\ProjectState.cs (6)
367public override AnalyzerConfigOptions GlobalOptions 370public override AnalyzerConfigOptions GetOptions(SyntaxTree tree) 396public override AnalyzerConfigOptions GetOptions(AdditionalText textFile) 439public override AnalyzerConfigOptions GlobalOptions 442public override AnalyzerConfigOptions GetOptions(SyntaxTree tree) 475public override AnalyzerConfigOptions GetOptions(AdditionalText textFile)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
OptionsCollection.cs (1)
100var builder = ImmutableDictionary.CreateBuilder<string, string>(AnalyzerConfigOptions.KeyComparer);
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
EditorConfigStorageLocation\NamingStylePreferenceEditorConfigStorageLocationTests.cs (1)
33}.ToImmutableDictionary(AnalyzerConfigOptions.KeyComparer)));
Options\DocumentOptionSetTests.cs (2)
26new DictionaryAnalyzerConfigOptions(ImmutableDictionary.Create<string, string>(AnalyzerConfigOptions.KeyComparer).Add( 128ImmutableDictionary.Create<string, string>(AnalyzerConfigOptions.KeyComparer).Add(
Microsoft.Gen.ComplianceReports (3)
ComplianceReportsGenerator.cs (1)
84var options = context.AnalyzerConfigOptions.GlobalOptions;
src\Generators\Shared\GeneratorUtilities.cs (2)
148public static bool TryRetrieveOptionsValue(AnalyzerConfigOptions options, string name, out string? value) 151public static string GetDefaultReportOutputPath(AnalyzerConfigOptions options)
Microsoft.Gen.ComplianceReports.Unit.Tests (3)
GeneratorTests.cs (3)
201public override AnalyzerConfigOptions GlobalOptions => new Options(analyzerOptions); 203public override AnalyzerConfigOptions GetOptions(SyntaxTree tree) => throw new System.NotSupportedException(); 204public override AnalyzerConfigOptions GetOptions(AdditionalText textFile) => throw new System.NotSupportedException();
Microsoft.Gen.ContextualOptions (2)
src\Generators\Shared\GeneratorUtilities.cs (2)
148public static bool TryRetrieveOptionsValue(AnalyzerConfigOptions options, string name, out string? value) 151public static string GetDefaultReportOutputPath(AnalyzerConfigOptions options)
Microsoft.Gen.Logging (2)
src\Generators\Shared\GeneratorUtilities.cs (2)
148public static bool TryRetrieveOptionsValue(AnalyzerConfigOptions options, string name, out string? value) 151public static string GetDefaultReportOutputPath(AnalyzerConfigOptions options)
Microsoft.Gen.Metrics (2)
src\Generators\Shared\GeneratorUtilities.cs (2)
148public static bool TryRetrieveOptionsValue(AnalyzerConfigOptions options, string name, out string? value) 151public static string GetDefaultReportOutputPath(AnalyzerConfigOptions options)
Microsoft.Gen.MetricsReports (3)
MetricsReportsGenerator.cs (1)
62var options = context.AnalyzerConfigOptions.GlobalOptions;
src\Generators\Shared\GeneratorUtilities.cs (2)
148public static bool TryRetrieveOptionsValue(AnalyzerConfigOptions options, string name, out string? value) 151public static string GetDefaultReportOutputPath(AnalyzerConfigOptions options)
Microsoft.Gen.MetricsReports.Unit.Tests (3)
GeneratorTests.cs (3)
191public override AnalyzerConfigOptions GlobalOptions => new Options(analyzerOptions); 193public override AnalyzerConfigOptions GetOptions(SyntaxTree tree) => throw new NotSupportedException(); 194public override AnalyzerConfigOptions GetOptions(AdditionalText textFile) => throw new NotSupportedException();
Microsoft.Interop.LibraryImportGenerator (5)
Analyzers\ConvertToLibraryImportFixer.cs (1)
637AnalyzerConfigOptions options = document.Project.AnalyzerOptions.AnalyzerConfigOptionsProvider.GetOptions(syntaxTree);
LibraryImportGeneratorOptions.cs (4)
10public LibraryImportGeneratorOptions(AnalyzerConfigOptions options) 20private static bool GetBoolOption(this AnalyzerConfigOptions options, string key) 27internal static bool UseMarshalType(this AnalyzerConfigOptions options) => options.GetBoolOption(UseMarshalTypeOption); 29internal static bool GenerateForwarders(this AnalyzerConfigOptions options) => options.GetBoolOption(GenerateForwardersOption);
System.Windows.Forms.Analyzers.CSharp.Tests (18)
CompilerAnalyzerConfigOptionsProvider.cs (11)
16private readonly ImmutableDictionary<object, AnalyzerConfigOptions> _treeDict; 20ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, 24ImmutableDictionary<object, AnalyzerConfigOptions> treeDict, 25AnalyzerConfigOptions globalOptions) 31public override AnalyzerConfigOptions GlobalOptions { get; } 33public override AnalyzerConfigOptions GetOptions(SyntaxTree tree) 34=> _treeDict.TryGetValue(tree, out var options) ? options : CompilerAnalyzerConfigOptions.Empty; 36public override AnalyzerConfigOptions GetOptions(AdditionalText textFile) 37=> _treeDict.TryGetValue(textFile, out var options) ? options : CompilerAnalyzerConfigOptions.Empty; 39internal CompilerAnalyzerConfigOptionsProvider WithAdditionalTreeOptions(ImmutableDictionary<object, AnalyzerConfigOptions> treeDict) 42internal CompilerAnalyzerConfigOptionsProvider WithGlobalOptions(AnalyzerConfigOptions globalOptions)
Generators\ProjectFileReaderTests.cs (7)
50CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions); 76CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions); 114CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions); 151CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions); 173CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions); 193CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions); 211CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions);