1 type derived from StructuredAnalyzerConfigOptions
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
22internal sealed class Implementation : StructuredAnalyzerConfigOptions
88 references to StructuredAnalyzerConfigOptions
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Formatting\OmniSharpSyntaxFormattingOptionsWrapper.cs (1)
29var optionsWithFallback = StructuredAnalyzerConfigOptions.Create(configOptions,
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\OnAutoInsert\OnAutoInsertHandler.cs (1)
242var fallbackOptions = document.Project.GetFallbackAnalyzerOptions();
Microsoft.CodeAnalysis.Workspaces (81)
Options\DocumentOptionSet.cs (3)
22private readonly StructuredAnalyzerConfigOptions? _configOptions; 29internal DocumentOptionSet(StructuredAnalyzerConfigOptions? configOptions, OptionSet underlyingOptions, string language) 34private DocumentOptionSet(StructuredAnalyzerConfigOptions? configOptions, OptionSet underlyingOptions, string language, ImmutableDictionary<OptionKey, object?> values)
OrganizeImports\OrganizeImportsOptionsProviders.cs (1)
25var configOptions = await document.GetHostAnalyzerConfigOptionsAsync(cancellationToken).ConfigureAwait(false);
Serialization\SerializationExtensions.cs (1)
32ImmutableDictionary<string, StructuredAnalyzerConfigOptions> => WellKnownSynchronizationKind.FallbackAnalyzerOptions,
Serialization\SerializerService.cs (7)
152Write(writer, (ImmutableDictionary<string, StructuredAnalyzerConfigOptions>)value); 163private static void Write(ObjectWriter writer, ImmutableDictionary<string, StructuredAnalyzerConfigOptions> optionsByLanguage) 175void Serialize(string language, StructuredAnalyzerConfigOptions? options) 197private static ImmutableDictionary<string, StructuredAnalyzerConfigOptions> ReadFallbackAnalyzerOptions(ObjectReader reader) 202return ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty; 208var optionsByLanguage = ImmutableDictionary.CreateBuilder<string, StructuredAnalyzerConfigOptions>(); 228optionsByLanguage.Add(language, StructuredAnalyzerConfigOptions.Create(new DictionaryAnalyzerConfigOptions(options.ToImmutable())));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (7)
26private readonly StructuredAnalyzerConfigOptions? _fallback; 28public Implementation(AnalyzerConfigOptions options, StructuredAnalyzerConfigOptions? fallback) 48public static readonly StructuredAnalyzerConfigOptions Empty = Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty)); 52public static StructuredAnalyzerConfigOptions Create(AnalyzerConfigOptions options, StructuredAnalyzerConfigOptions? fallback = null) 58public static bool TryGetStructuredOptions(AnalyzerConfigOptions configOptions, [NotNullWhen(true)] out StructuredAnalyzerConfigOptions? options) 60if (configOptions is StructuredAnalyzerConfigOptions structuredOptions)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (2)
27if (StructuredAnalyzerConfigOptions.TryGetStructuredOptions(analyzerConfigOptions, out var structuredOptions))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\AddImport\AddImportPlacementOptionsProviders.cs (1)
29var configOptions = await document.GetHostAnalyzerConfigOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupOptionsProviders.cs (1)
29var configOptions = await document.GetHostAnalyzerConfigOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationOptionsProviders.cs (1)
37var configOptions = await document.GetHostAnalyzerConfigOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Formatting\DocumentFormattingOptionsProviders.cs (1)
24var configOptions = await document.GetHostAnalyzerConfigOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Formatting\LineFormattingOptionsProviders.cs (1)
19var configOptions = await document.GetHostAnalyzerConfigOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Formatting\SyntaxFormattingOptionsProviders.cs (1)
22var configOptions = await document.GetHostAnalyzerConfigOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\NamingStyles\NamingStylePreferencesProviders.cs (1)
17var configOptions = await document.GetHostAnalyzerConfigOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Options\MemberDisplayOptions.cs (1)
52var configOptions = await document.GetHostAnalyzerConfigOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplifierOptionsProviders.cs (1)
22var configOptions = await document.GetHostAnalyzerConfigOptionsAsync(cancellationToken).ConfigureAwait(false);
Workspace\Host\IFallbackAnalyzerConfigOptionsProvider.cs (3)
17StructuredAnalyzerConfigOptions GetOptions(string language); 26public StructuredAnalyzerConfigOptions GetOptions(string language) 27=> StructuredAnalyzerConfigOptions.Empty;
Workspace\Solution\AnalyzerConfigData.cs (6)
17public readonly StructuredAnalyzerConfigOptions ConfigOptionsWithoutFallback; 19public readonly StructuredAnalyzerConfigOptions ConfigOptionsWithFallback; 26public AnalyzerConfigData(AnalyzerConfigOptionsResult result, StructuredAnalyzerConfigOptions fallbackOptions) 29ConfigOptionsWithoutFallback = StructuredAnalyzerConfigOptions.Create(_dictionaryConfigOptions, StructuredAnalyzerConfigOptions.Empty); 30ConfigOptionsWithFallback = StructuredAnalyzerConfigOptions.Create(_dictionaryConfigOptions, fallbackOptions);
Workspace\Solution\Document.cs (2)
549var options = await arg.self.GetHostAnalyzerConfigOptionsAsync(cancellationToken).ConfigureAwait(false); 558internal async ValueTask<StructuredAnalyzerConfigOptions> GetHostAnalyzerConfigOptionsAsync(CancellationToken cancellationToken)
Workspace\Solution\Project.cs (2)
827internal StructuredAnalyzerConfigOptions GetFallbackAnalyzerOptions() 828=> Solution.FallbackAnalyzerOptions.GetValueOrDefault(Language, StructuredAnalyzerConfigOptions.Empty);
Workspace\Solution\ProjectState.AnalyzerConfigOptionsCache.cs (4)
22private readonly struct AnalyzerConfigOptionsCache(TextDocumentStates<AnalyzerConfigDocumentState> analyzerConfigDocumentStates, StructuredAnalyzerConfigOptions fallbackOptions) 24public readonly struct Value(AnalyzerConfigSet configSet, StructuredAnalyzerConfigOptions fallbackOptions) 28private readonly Lazy<AnalyzerConfigData> _global = new(() => new AnalyzerConfigData(configSet.GlobalConfigOptions, StructuredAnalyzerConfigOptions.Empty)); 56public StructuredAnalyzerConfigOptions FallbackOptions
Workspace\Solution\ProjectState.cs (12)
95public ProjectState(LanguageServices languageServices, ProjectInfo projectInfo, StructuredAnalyzerConfigOptions fallbackAnalyzerOptions) 382internal async ValueTask<StructuredAnalyzerConfigOptions> GetOptionsAsync(DocumentState documentState, CancellationToken cancellationToken) 388private StructuredAnalyzerConfigOptions GetOptions(in AnalyzerConfigOptionsCache.Value cache, DocumentState documentState) 392? StructuredAnalyzerConfigOptions.Empty 402private static StructuredAnalyzerConfigOptions GetOptionsForSourcePath(in AnalyzerConfigOptionsCache.Value cache, string path) 454internal async ValueTask<StructuredAnalyzerConfigOptions> GetOptionsAsync(DocumentState documentState, CancellationToken cancellationToken) 460private StructuredAnalyzerConfigOptions GetOptions(in AnalyzerConfigOptionsCache.Value cache, DocumentState documentState) 471? StructuredAnalyzerConfigOptions.Empty 481private static StructuredAnalyzerConfigOptions GetOptionsForSourcePath(in AnalyzerConfigOptionsCache.Value cache, string path) 517private sealed class RazorDesignTimeAnalyzerConfigOptions(SolutionServices services) : StructuredAnalyzerConfigOptions 800public ProjectState WithFallbackAnalyzerOptions(StructuredAnalyzerConfigOptions options) 895private ProjectState CreateNewStateForChangedAnalyzerConfig(TextDocumentStates<AnalyzerConfigDocumentState> newAnalyzerConfigDocumentStates, StructuredAnalyzerConfigOptions fallbackOptions)
Workspace\Solution\Solution.cs (3)
63ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions) 508internal Solution WithFallbackAnalyzerOptions(ImmutableDictionary<string, StructuredAnalyzerConfigOptions> options) 1693internal ImmutableDictionary<string, StructuredAnalyzerConfigOptions> FallbackAnalyzerOptions => SolutionState.FallbackAnalyzerOptions;
Workspace\Solution\SolutionCompilationState.cs (2)
943/// <inheritdoc cref="SolutionState.WithFallbackAnalyzerOptions(ImmutableDictionary{string, StructuredAnalyzerConfigOptions})"/> 944public SolutionCompilationState WithFallbackAnalyzerOptions(ImmutableDictionary<string, StructuredAnalyzerConfigOptions> options)
Workspace\Solution\SolutionInfo.cs (4)
50internal ImmutableDictionary<string, StructuredAnalyzerConfigOptions> FallbackAnalyzerOptions { get; } 56ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions) 87=> Create(id, version, filePath, projects, analyzerReferences, ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty); 98ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions)
Workspace\Solution\SolutionState.cs (10)
48public ImmutableDictionary<string, StructuredAnalyzerConfigOptions> FallbackAnalyzerOptions { get; } = ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty; 71ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions, 108ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions) 171ImmutableDictionary<string, StructuredAnalyzerConfigOptions>? fallbackAnalyzerOptions = null, 359if (!FallbackAnalyzerOptions.TryGetValue(language, out var fallbackAnalyzerOptions)) 361fallbackAnalyzerOptions = StructuredAnalyzerConfigOptions.Empty; 936public SolutionState WithFallbackAnalyzerOptions(ImmutableDictionary<string, StructuredAnalyzerConfigOptions> options) 949if (!options.TryGetValue(entry.Value.Language, out var languageOptions)) 951languageOptions = StructuredAnalyzerConfigOptions.Empty;
Workspace\Workspace.cs (3)
86_latestSolution = CreateSolution(info, emptyOptions, analyzerReferences: [], fallbackAnalyzerOptions: ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty); 127private Solution CreateSolution(SolutionInfo solutionInfo, SolutionOptionSet options, IReadOnlyList<AnalyzerReference> analyzerReferences, ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions) 978internal void OnSolutionFallbackAnalyzerOptionsChanged(ImmutableDictionary<string, StructuredAnalyzerConfigOptions> options)
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
EditorConfigStorageLocation\NamingStylePreferenceEditorConfigStorageLocationTests.cs (2)
17var options = StructuredAnalyzerConfigOptions.Create(DictionaryAnalyzerConfigOptions.Empty); 25var options = StructuredAnalyzerConfigOptions.Create(new DictionaryAnalyzerConfigOptions(new Dictionary<string, string>()
Options\DocumentOptionSetTests.cs (2)
25var configOptions = StructuredAnalyzerConfigOptions.Create( 127var configOptions = StructuredAnalyzerConfigOptions.Create(new DictionaryAnalyzerConfigOptions(
Microsoft.VisualStudio.LanguageServices (1)
Snippets\SnippetExpansionClient.cs (1)
1065var fallbackOptions = documentWithImports.Project.GetFallbackAnalyzerOptions();