4 instantiations of StateSet
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.cs (4)
143
builder.Add(FileContentLoadAnalyzer.Instance, new
StateSet
(language, FileContentLoadAnalyzer.Instance, isHostAnalyzer: true));
144
builder.Add(GeneratorDiagnosticsPlaceholderAnalyzer.Instance, new
StateSet
(language, GeneratorDiagnosticsPlaceholderAnalyzer.Instance, isHostAnalyzer: true));
162
builder.Add(analyzer, new
StateSet
(language, analyzer, isHostAnalyzer: false));
181
builder.Add(analyzer, new
StateSet
(language, analyzer, isHostAnalyzer: true));
65 references to StateSet
Microsoft.CodeAnalysis.LanguageServer.Protocol (65)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.AnalysisData.cs (2)
112
public static async Task<ProjectAnalysisData> CreateAsync(Project project, IEnumerable<
StateSet
> stateSets, bool avoidLoadingData, CancellationToken cancellationToken)
117
foreach (
var
stateSet in stateSets)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.CompilationManager.cs (1)
13
private static Task<CompilationWithAnalyzersPair?> CreateCompilationWithAnalyzersAsync(Project project, ImmutableArray<
StateSet
> stateSets, bool includeSuppressedDiagnostics, bool crashOnAnalyzerException, CancellationToken cancellationToken)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (2)
65
foreach (
var
stateSet in e.Removed)
89
private static string GetProjectLogMessage(Project project, ImmutableArray<
StateSet
> stateSets)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (2)
26
CompilationWithAnalyzersPair? compilationWithAnalyzers, Project project, ImmutableArray<
StateSet
> stateSets, CancellationToken cancellationToken)
123
CompilationWithAnalyzersPair? compilationWithAnalyzers, Project project, ImmutableArray<
StateSet
> stateSets,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectAnalyzerReferenceChangedEventArgs.cs (5)
16
/// and what <see cref="
StateSet
"/> has changed.
21
public readonly ImmutableArray<
StateSet
> Added;
22
public readonly ImmutableArray<
StateSet
> Removed;
24
public ProjectAnalyzerReferenceChangedEventArgs(Project project, ImmutableArray<
StateSet
> added, ImmutableArray<
StateSet
> removed)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (2)
32
private readonly
StateSet
_owner;
37
public 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.
62
public 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"/>.
78
public 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.
86
public 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.
97
public async Task<
StateSet
?> GetOrCreateStateSetAsync(Project project, DiagnosticAnalyzer analyzer, CancellationToken cancellationToken)
100
if (projectStateSets.StateSetMap.TryGetValue(analyzer, out
var
stateSet))
114
public bool OnProjectRemoved(IEnumerable<
StateSet
> stateSets, ProjectId projectId)
117
foreach (
var
stateSet in stateSets)
133
private static ImmutableDictionary<DiagnosticAnalyzer,
StateSet
> CreateStateSetMap(
139
var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer,
StateSet
>();
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.HostStates.cs (10)
18
public IEnumerable<
StateSet
> GetAllHostStateSets()
25
foreach (
var
stateSet in value.OrderedStateSets)
115
public readonly ImmutableArray<
StateSet
> OrderedStateSets;
117
public readonly ImmutableDictionary<DiagnosticAnalyzer,
StateSet
> StateSetMap;
119
private HostAnalyzerStateSets(ImmutableDictionary<DiagnosticAnalyzer,
StateSet
> stateSetMap, ImmutableArray<
StateSet
> orderedStateSets)
125
public HostAnalyzerStateSets(ImmutableDictionary<DiagnosticAnalyzer,
StateSet
> analyzerMap)
147
private int PriorityComparison(
StateSet
state1,
StateSet
state2)
150
private static int GetPriority(
StateSet
state)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.ProjectStates.cs (9)
24
ImmutableDictionary<DiagnosticAnalyzer,
StateSet
>.Empty,
32
public readonly ImmutableDictionary<DiagnosticAnalyzer,
StateSet
> StateSetMap;
39
ImmutableDictionary<DiagnosticAnalyzer,
StateSet
> stateSetMap,
49
public IEnumerable<
StateSet
> GetAllProjectStateSets()
127
ImmutableDictionary<DiagnosticAnalyzer,
StateSet
> newMap)
157
private static ImmutableArray<
StateSet
> DiffStateSets(
160
ImmutableDictionary<DiagnosticAnalyzer,
StateSet
> map)
168
var builder = ImmutableArray.CreateBuilder<
StateSet
>();
180
if (!map.TryGetValue(analyzer, out
var
set))
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (6)
60
private readonly ImmutableArray<
StateSet
> _stateSets;
117
ImmutableArray<
StateSet
> stateSets,
140
static bool HasAllAnalyzers(IEnumerable<
StateSet
> stateSets, CompilationWithAnalyzersPair compilationWithAnalyzers)
142
foreach (
var
stateSet in stateSets)
159
ImmutableArray<
StateSet
> stateSets,
203
foreach (
var
stateSet in _stateSets)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (5)
42
foreach (
var
stateSet in stateSets)
68
foreach (
var
stateSet in stateSets)
74
/// Return list of <see cref="
StateSet
"/> to be used for full solution analysis.
76
private ImmutableArray<
StateSet
> GetStateSetsForFullSolutionAnalysis(ImmutableArray<
StateSet
> stateSets, Project project)