4 instantiations of StateSet
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.cs (4)
143builder.Add(FileContentLoadAnalyzer.Instance, new StateSet(language, FileContentLoadAnalyzer.Instance, isHostAnalyzer: true)); 144builder.Add(GeneratorDiagnosticsPlaceholderAnalyzer.Instance, new StateSet(language, GeneratorDiagnosticsPlaceholderAnalyzer.Instance, isHostAnalyzer: true)); 162builder.Add(analyzer, new StateSet(language, analyzer, isHostAnalyzer: false)); 181builder.Add(analyzer, new StateSet(language, analyzer, isHostAnalyzer: true));
65 references to StateSet
Microsoft.CodeAnalysis.LanguageServer.Protocol (65)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.AnalysisData.cs (2)
112public static async Task<ProjectAnalysisData> CreateAsync(Project project, IEnumerable<StateSet> stateSets, bool avoidLoadingData, CancellationToken cancellationToken) 117foreach (var stateSet in stateSets)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.CompilationManager.cs (1)
13private static Task<CompilationWithAnalyzersPair?> CreateCompilationWithAnalyzersAsync(Project project, ImmutableArray<StateSet> stateSets, bool includeSuppressedDiagnostics, bool crashOnAnalyzerException, CancellationToken cancellationToken)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (2)
65foreach (var stateSet in e.Removed) 89private static string GetProjectLogMessage(Project project, ImmutableArray<StateSet> stateSets)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (2)
26CompilationWithAnalyzersPair? compilationWithAnalyzers, Project project, ImmutableArray<StateSet> stateSets, CancellationToken cancellationToken) 123CompilationWithAnalyzersPair? compilationWithAnalyzers, Project project, ImmutableArray<StateSet> stateSets,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectAnalyzerReferenceChangedEventArgs.cs (5)
16/// and what <see cref="StateSet"/> has changed. 21public readonly ImmutableArray<StateSet> Added; 22public readonly ImmutableArray<StateSet> Removed; 24public ProjectAnalyzerReferenceChangedEventArgs(Project project, ImmutableArray<StateSet> added, ImmutableArray<StateSet> removed)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (2)
32private readonly StateSet _owner; 37public ProjectState(StateSet owner, ProjectId projectId)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.cs (21)
19/// This is in charge of anything related to <see cref="StateSet"/> 59/// Return <see cref="StateSet"/>s for the given <see cref="ProjectId"/>. 60/// This will never create new <see cref="StateSet"/> but will return ones already created. 62public IEnumerable<StateSet> GetStateSets(ProjectId projectId) 73/// Return <see cref="StateSet"/>s for the given <see cref="Project"/>. 74/// This will never create new <see cref="StateSet"/> but will return ones already created. 76/// this will only return <see cref="StateSet"/>s that have same language as <paramref name="project"/>. 78public IEnumerable<StateSet> GetStateSets(Project project) 82/// Return <see cref="StateSet"/>s for the given <see cref="Project"/>. 83/// This will either return already created <see cref="StateSet"/>s for the specific snapshot of <see cref="Project"/> or 84/// it will create new <see cref="StateSet"/>s for the <see cref="Project"/> and update internal state. 86public async Task<ImmutableArray<StateSet>> GetOrCreateStateSetsAsync(Project project, CancellationToken cancellationToken) 93/// Return <see cref="StateSet"/> for the given <see cref="DiagnosticAnalyzer"/> in the context of <see cref="Project"/>. 94/// This will either return already created <see cref="StateSet"/> for the specific snapshot of <see cref="Project"/> or 95/// it will create new <see cref="StateSet"/> for the <see cref="Project"/>. and update internal state. 97public async Task<StateSet?> GetOrCreateStateSetAsync(Project project, DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 100if (projectStateSets.StateSetMap.TryGetValue(analyzer, out var stateSet)) 114public bool OnProjectRemoved(IEnumerable<StateSet> stateSets, ProjectId projectId) 117foreach (var stateSet in stateSets) 133private static ImmutableDictionary<DiagnosticAnalyzer, StateSet> CreateStateSetMap( 139var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, StateSet>();
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.HostStates.cs (10)
18public IEnumerable<StateSet> GetAllHostStateSets() 25foreach (var stateSet in value.OrderedStateSets) 115public readonly ImmutableArray<StateSet> OrderedStateSets; 117public readonly ImmutableDictionary<DiagnosticAnalyzer, StateSet> StateSetMap; 119private HostAnalyzerStateSets(ImmutableDictionary<DiagnosticAnalyzer, StateSet> stateSetMap, ImmutableArray<StateSet> orderedStateSets) 125public HostAnalyzerStateSets(ImmutableDictionary<DiagnosticAnalyzer, StateSet> analyzerMap) 147private int PriorityComparison(StateSet state1, StateSet state2) 150private static int GetPriority(StateSet state)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.ProjectStates.cs (9)
24ImmutableDictionary<DiagnosticAnalyzer, StateSet>.Empty, 32public readonly ImmutableDictionary<DiagnosticAnalyzer, StateSet> StateSetMap; 39ImmutableDictionary<DiagnosticAnalyzer, StateSet> stateSetMap, 49public IEnumerable<StateSet> GetAllProjectStateSets() 127ImmutableDictionary<DiagnosticAnalyzer, StateSet> newMap) 157private static ImmutableArray<StateSet> DiffStateSets( 160ImmutableDictionary<DiagnosticAnalyzer, StateSet> map) 168var builder = ImmutableArray.CreateBuilder<StateSet>(); 180if (!map.TryGetValue(analyzer, out var set))
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (6)
60private readonly ImmutableArray<StateSet> _stateSets; 117ImmutableArray<StateSet> stateSets, 140static bool HasAllAnalyzers(IEnumerable<StateSet> stateSets, CompilationWithAnalyzersPair compilationWithAnalyzers) 142foreach (var stateSet in stateSets) 159ImmutableArray<StateSet> stateSets, 203foreach (var stateSet in _stateSets)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (5)
42foreach (var stateSet in stateSets) 68foreach (var stateSet in stateSets) 74/// Return list of <see cref="StateSet"/> to be used for full solution analysis. 76private ImmutableArray<StateSet> GetStateSetsForFullSolutionAnalysis(ImmutableArray<StateSet> stateSets, Project project)