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