88 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 (9)
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)
146
_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 (42)
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)
74
internal int WorkspaceVersion => this.
SolutionState
.WorkspaceVersion;
82
public SolutionServices Services => this.
SolutionState
.Services;
84
internal string? WorkspaceKind => this.
SolutionState
.WorkspaceKind;
86
internal ProjectState? GetProjectState(ProjectId projectId) => this.
SolutionState
.GetProjectState(projectId);
97
return this.
SolutionState
.Services.WorkspaceServices.Workspace;
105
public SolutionId Id => this.
SolutionState
.Id;
110
public string? FilePath => this.
SolutionState
.FilePath;
115
public VersionStamp Version => this.
SolutionState
.Version;
121
public IReadOnlyList<ProjectId> ProjectIds => this.
SolutionState
.ProjectIds;
127
internal ImmutableArray<ProjectState> SortedProjectStates => this.
SolutionState
.SortedProjectStates;
138
public VersionStamp GetLatestProjectVersion() => this.
SolutionState
.GetLatestProjectVersion();
144
=> this.
SolutionState
.ContainsProject(projectId);
167
var state = solution.
SolutionState
.GetProjectState(projectId);
222
public bool ContainsDocument([NotNullWhen(returnValue: true)] DocumentId? documentId) => this.
SolutionState
.ContainsDocument(documentId);
227
public bool ContainsAdditionalDocument([NotNullWhen(returnValue: true)] DocumentId? documentId) => this.
SolutionState
.ContainsAdditionalDocument(documentId);
232
public bool ContainsAnalyzerConfigDocument([NotNullWhen(returnValue: true)] DocumentId? documentId) => this.
SolutionState
.ContainsAnalyzerConfigDocument(documentId);
632
if (this.
SolutionState
.ContainsProjectReference(projectId, projectReference))
728
if (this.
SolutionState
.ContainsMetadataReference(projectId, metadataReference))
811
if (this.
SolutionState
.ContainsAnalyzerReference(projectId, analyzerReference))
895
if (this.
SolutionState
.AnalyzerReferences.Contains(analyzerReference))
915
if (!this.
SolutionState
.AnalyzerReferences.Contains(analyzerReference))
1129
=> this.
SolutionState
.GetProjectState(projectId) ?? throw new InvalidOperationException(string.Format(WorkspacesResources._0_is_not_part_of_the_workspace, projectId));
1579
=> this.
SolutionState
.GetRelatedDocumentIds(documentId, includeDifferentLanguages);
1589
=> this.
SolutionState
.GetFirstRelatedDocumentId(documentId, relatedProjectIdHint);
1696
public ImmutableArray<DocumentId> GetDocumentIdsWithFilePath(string? filePath) => this.
SolutionState
.GetDocumentIdsWithFilePath(filePath);
1701
public ProjectDependencyGraph GetProjectDependencyGraph() => this.
SolutionState
.GetProjectDependencyGraph();
1707
public OptionSet Options => this.
SolutionState
.Options;
1712
public IReadOnlyList<AnalyzerReference> AnalyzerReferences => this.
SolutionState
.AnalyzerReferences;
1720
internal ImmutableDictionary<string, StructuredAnalyzerConfigOptions> FallbackAnalyzerOptions =>
SolutionState
.FallbackAnalyzerOptions;
1862
if (this.
SolutionState
.ContainsTransitiveReference(projectReference.ProjectId, projectId))
1880
var projectState = this.
SolutionState
.GetRequiredProjectState(projectId);
1883
var hasSubmissionReference = !ignoreExistingReferences && projectState.ProjectReferences.Any(p => this.
SolutionState
.GetRequiredProjectState(p.ProjectId).IsSubmission);
1888
var referencedProjectState = this.
SolutionState
.GetProjectState(projectReference.ProjectId);
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))
1623
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)
951
var checksum0 = await project0.Solution.
SolutionState
.GetChecksumAsync(CancellationToken.None);
954
var checksum1 = await project1.Solution.
SolutionState
.GetChecksumAsync(CancellationToken.None);
960
var checksum2 = await project2.Solution.
SolutionState
.GetChecksumAsync(CancellationToken.None);
970
var checksum3 = await project3.Solution.
SolutionState
.GetChecksumAsync(CancellationToken.None);
Microsoft.VisualStudio.LanguageServices (2)
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (1)
75
var hostAnalyzers = currentSolution.
SolutionState
.Analyzers;
TaskList\ExternalErrorDiagnosticUpdateSource.cs (1)
368
var descriptorMap = Solution.
SolutionState
.Analyzers.GetDiagnosticDescriptorsPerReference(_owner.AnalyzerInfoCache, project);
Roslyn.VisualStudio.Next.UnitTests (1)
Services\SolutionServiceTests.cs (1)
233
], solution.
SolutionState
.ProjectCountByLanguage.Select(e => (e.Key, e.Value)));