90 references to SolutionState
Microsoft.CodeAnalysis.CSharp.Features (1)
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (1)
134
var hostAnalyzers = document.Project.Solution.
SolutionState
.Analyzers;
Microsoft.CodeAnalysis.EditorFeatures (2)
EditorConfigSettings\Aggregator\SettingsAggregator.cs (2)
38
var currentSolution = _workspace.CurrentSolution.
SolutionState
;
96
UpdateProviders(_workspace.CurrentSolution.
SolutionState
);
Microsoft.CodeAnalysis.Features (11)
Diagnostics\Service\DiagnosticAnalyzerService.cs (2)
252
return solution.
SolutionState
.Analyzers.GetDiagnosticDescriptorsPerReference(this._analyzerInfoCache);
272
return project.Solution.
SolutionState
.Analyzers.GetDiagnosticDescriptorsPerReference(this._analyzerInfoCache, project);
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.cs (1)
49
=> _stateManager.GetOrCreateAnalyzersAsync(project.Solution.
SolutionState
, project.State, cancellationToken);
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (1)
62
var compilerAnalyzer = project.Solution.
SolutionState
.Analyzers.GetCompilerDiagnosticAnalyzer(project.Language);
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnostics.cs (2)
65
solution.
SolutionState
, project.State, cancellationToken).ConfigureAwait(false);
67
solution.
SolutionState
, project.State, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (1)
62
var solutionState = project.Solution.
SolutionState
;
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (1)
78
var solutionState = project.Solution.
SolutionState
;
Diagnostics\Service\EngineV2\InProcOrRemoteHostAnalyzerRunner.cs (1)
101
var skippedAnalyzersInfo = project.Solution.
SolutionState
.Analyzers.GetSkippedAnalyzersInfo(project.State, AnalyzerInfoCache);
EditAndContinue\DebuggingSession.cs (1)
147
_telemetry = new DebuggingSessionTelemetry(solution.
SolutionState
.SolutionAttributes.TelemetryId);
Workspace\CompileTimeSolutionProvider.cs (1)
103
foreach (var projectState in compileTimeSolution.
SolutionState
.SortedProjectStates)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\Diagnostics\BuildOnlyDiagnosticIdsHandler.cs (1)
57
var analyzersPerReferenceMap = context.Solution.
SolutionState
.Analyzers.CreateDiagnosticAnalyzersPerReference(project);
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Host\RemoteWorkspace.SolutionCreator.cs (1)
151
var solutionState = solution.
SolutionState
;
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (1)
165
var skippedAnalyzersInfo = _project.Solution.
SolutionState
.Analyzers.GetSkippedAnalyzersInfo(
Microsoft.CodeAnalysis.Workspaces (43)
Workspace\Host\PersistentStorage\ProjectKey.cs (1)
35
=> ToProjectKey(project.Solution.
SolutionState
, project.State);
Workspace\Host\PersistentStorage\SolutionKey.cs (1)
22
=> ToSolutionKey(solution.
SolutionState
);
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
309
var projectState = solution.
SolutionState
.GetRequiredProjectState(projectId);
Workspace\Solution\Solution.cs (33)
73
internal int SolutionStateContentVersion => this.
SolutionState
.ContentVersion;
81
public SolutionServices Services => this.
SolutionState
.Services;
83
internal string? WorkspaceKind => this.
SolutionState
.WorkspaceKind;
85
internal ProjectState? GetProjectState(ProjectId projectId) => this.
SolutionState
.GetProjectState(projectId);
96
return this.
SolutionState
.Services.WorkspaceServices.Workspace;
104
public SolutionId Id => this.
SolutionState
.Id;
109
public string? FilePath => this.
SolutionState
.FilePath;
114
public VersionStamp Version => this.
SolutionState
.Version;
120
public IReadOnlyList<ProjectId> ProjectIds => this.
SolutionState
.ProjectIds;
126
internal ImmutableArray<ProjectState> SortedProjectStates => this.
SolutionState
.SortedProjectStates;
137
public VersionStamp GetLatestProjectVersion() => this.
SolutionState
.GetLatestProjectVersion();
143
=> this.
SolutionState
.ContainsProject(projectId);
166
var state = solution.
SolutionState
.GetProjectState(projectId);
221
public bool ContainsDocument([NotNullWhen(returnValue: true)] DocumentId? documentId) => this.
SolutionState
.ContainsDocument(documentId);
226
public bool ContainsAdditionalDocument([NotNullWhen(returnValue: true)] DocumentId? documentId) => this.
SolutionState
.ContainsAdditionalDocument(documentId);
231
public bool ContainsAnalyzerConfigDocument([NotNullWhen(returnValue: true)] DocumentId? documentId) => this.
SolutionState
.ContainsAnalyzerConfigDocument(documentId);
631
if (this.
SolutionState
.ContainsProjectReference(projectId, projectReference))
727
if (this.
SolutionState
.ContainsMetadataReference(projectId, metadataReference))
810
if (this.
SolutionState
.ContainsAnalyzerReference(projectId, analyzerReference))
894
if (this.
SolutionState
.AnalyzerReferences.Contains(analyzerReference))
914
if (!this.
SolutionState
.AnalyzerReferences.Contains(analyzerReference))
1128
=> this.
SolutionState
.GetProjectState(projectId) ?? throw new InvalidOperationException(string.Format(WorkspacesResources._0_is_not_part_of_the_workspace, projectId));
1578
=> this.
SolutionState
.GetRelatedDocumentIds(documentId, includeDifferentLanguages);
1588
=> this.
SolutionState
.GetFirstRelatedDocumentId(documentId, relatedProjectIdHint);
1695
public ImmutableArray<DocumentId> GetDocumentIdsWithFilePath(string? filePath) => this.
SolutionState
.GetDocumentIdsWithFilePath(filePath);
1700
public ProjectDependencyGraph GetProjectDependencyGraph() => this.
SolutionState
.GetProjectDependencyGraph();
1706
public OptionSet Options => this.
SolutionState
.Options;
1711
public IReadOnlyList<AnalyzerReference> AnalyzerReferences => this.
SolutionState
.AnalyzerReferences;
1719
internal ImmutableDictionary<string, StructuredAnalyzerConfigOptions> FallbackAnalyzerOptions =>
SolutionState
.FallbackAnalyzerOptions;
1861
if (this.
SolutionState
.ContainsTransitiveReference(projectReference.ProjectId, projectId))
1879
var projectState = this.
SolutionState
.GetRequiredProjectState(projectId);
1882
var hasSubmissionReference = !ignoreExistingReferences && projectState.ProjectReferences.Any(p => this.
SolutionState
.GetRequiredProjectState(p.ProjectId).IsSubmission);
1887
var referencedProjectState = this.
SolutionState
.GetProjectState(projectReference.ProjectId);
Workspace\Solution\SolutionState.cs (1)
243
var solutionStateContentVersion = oldSolution.
SolutionState
== this
Workspace\Workspace.cs (6)
390
changedDocumentState ??= solution.
SolutionState
.GetRequiredDocumentState(changedDocumentId);
426
foreach (var (language, _) in oldSolution.
SolutionState
.ProjectCountByLanguage)
428
if (!newSolution.
SolutionState
.ProjectCountByLanguage.ContainsKey(language))
435
foreach (var (language, _) in newSolution.
SolutionState
.ProjectCountByLanguage)
437
if (oldSolution.
SolutionState
.ProjectCountByLanguage.ContainsKey(language))
1621
var changedOptions = newSolution.
SolutionState
.Options.GetChangedOptions();
Microsoft.CodeAnalysis.Workspaces.UnitTests (28)
SolutionTests\ProjectDependencyGraphTests.cs (9)
506
var expected = solution.
SolutionState
.GetProjectDependencyGraph().GetProjectsThatTransitivelyDependOnThisProject(d.Id);
514
Assert.Same(expected, solution.
SolutionState
.GetProjectDependencyGraph().GetTestAccessor().TryGetProjectsThatTransitivelyDependOnThisProject(d.Id));
534
var expected = solution.
SolutionState
.GetProjectDependencyGraph().GetProjectsThatTransitivelyDependOnThisProject(e.Id);
542
Assert.Same(expected, solution.
SolutionState
.GetProjectDependencyGraph().GetTestAccessor().TryGetProjectsThatTransitivelyDependOnThisProject(e.Id));
563
var notExpected = solution.
SolutionState
.GetProjectDependencyGraph().GetProjectsThatTransitivelyDependOnThisProject(c.Id);
571
Assert.Null(solution.
SolutionState
.GetProjectDependencyGraph().GetTestAccessor().TryGetProjectsThatTransitivelyDependOnThisProject(c.Id));
610
var dependencyGraph = solution.
SolutionState
.GetProjectDependencyGraph();
617
Assert.Same(dependencyGraph, solution.
SolutionState
.GetProjectDependencyGraph());
622
Assert.NotSame(dependencyGraph, solution.
SolutionState
.GetProjectDependencyGraph());
SolutionTests\SolutionTests.cs (15)
4999
Assert.Equal(2, solution.
SolutionState
.ProjectCountByLanguage[LanguageNames.CSharp]);
5023
Assert.Equal(2, solution.
SolutionState
.ProjectCountByLanguage[LanguageNames.CSharp]);
5051
Assert.Equal(2, solution.
SolutionState
.ProjectCountByLanguage[LanguageNames.CSharp]);
5082
Assert.Equal(3, solution.
SolutionState
.ProjectCountByLanguage[LanguageNames.CSharp]);
5113
Assert.Equal(3, solution.
SolutionState
.ProjectCountByLanguage[LanguageNames.CSharp]);
5145
Assert.Equal(3, solution.
SolutionState
.ProjectCountByLanguage[LanguageNames.CSharp]);
5197
Assert.Equal(3, solution.
SolutionState
.ProjectCountByLanguage[LanguageNames.CSharp]);
5213
Assert.Equal(1, solution.
SolutionState
.ProjectCountByLanguage[LanguageNames.CSharp]);
5242
Assert.Equal(3, solution.
SolutionState
.ProjectCountByLanguage[LanguageNames.CSharp]);
5257
Assert.Equal(1, solution.
SolutionState
.ProjectCountByLanguage[LanguageNames.CSharp]);
5314
], solution.
SolutionState
.ProjectCountByLanguage.Select(e => (e.Key, e.Value)));
5322
], solution.
SolutionState
.ProjectCountByLanguage.Select(e => (e.Key, e.Value)));
5329
], solution.
SolutionState
.ProjectCountByLanguage.Select(e => (e.Key, e.Value)));
5335
], solution.
SolutionState
.ProjectCountByLanguage.Select(e => (e.Key, e.Value)));
5338
Assert.Empty(solution.
SolutionState
.ProjectCountByLanguage);
SolutionTests\SolutionWithSourceGeneratorTests.cs (4)
948
var checksum0 = await project0.Solution.
SolutionState
.GetChecksumAsync(CancellationToken.None);
951
var checksum1 = await project1.Solution.
SolutionState
.GetChecksumAsync(CancellationToken.None);
957
var checksum2 = await project2.Solution.
SolutionState
.GetChecksumAsync(CancellationToken.None);
967
var checksum3 = await project3.Solution.
SolutionState
.GetChecksumAsync(CancellationToken.None);
Microsoft.VisualStudio.LanguageServices (1)
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (1)
75
var hostAnalyzers = currentSolution.
SolutionState
.Analyzers;
Roslyn.VisualStudio.Next.UnitTests (1)
Services\SolutionServiceTests.cs (1)
233
], solution.
SolutionState
.ProjectCountByLanguage.Select(e => (e.Key, e.Value)));