1 write to SolutionState
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\SolutionCompilationState.cs (1)
67SolutionState = solution;
102 references to SolutionState
Microsoft.CodeAnalysis.Workspaces (102)
Workspace\Solution\Solution.cs (1)
70internal SolutionState SolutionState => CompilationState.SolutionState;
Workspace\Solution\SolutionCompilationState.CompilationTracker.CompilationTrackerState.cs (2)
133/// cref="Compilation"/> provided to any clients of the <see cref="SolutionState"/> (for example, through 136/// stores extra information in it about that compilation that the <see cref="SolutionState"/> can be
Workspace\Solution\SolutionCompilationState.cs (84)
100public SolutionServices Services => this.SolutionState.Services; 110Contract.ThrowIfFalse(this.SolutionState.SortedProjectStates 126if (newSolutionState == this.SolutionState && 164if (stateChange.NewSolutionState == this.SolutionState) 172/// except that it will still fork even if newSolutionState is unchanged from <see cref="SolutionState"/>. 325var newSolutionState = this.SolutionState.AddProjects(projectInfos); 365var newSolutionState = this.SolutionState.RemoveProjects(projectIds); 367var originalDependencyGraph = this.SolutionState.GetProjectDependencyGraph(); 409this.SolutionState.WithProjectAssemblyName(projectId, assemblyName), 420this.SolutionState.WithProjectOutputFilePath(projectId, outputFilePath), 430this.SolutionState.WithProjectOutputRefFilePath(projectId, outputRefFilePath), 440this.SolutionState.WithProjectCompilationOutputInfo(projectId, info), 450this.SolutionState.WithProjectDefaultNamespace(projectId, defaultNamespace), 460this.SolutionState.WithProjectChecksumAlgorithm(projectId, checksumAlgorithm), 471this.SolutionState.WithProjectName(projectId, name), 481this.SolutionState.WithProjectFilePath(projectId, filePath), 491this.SolutionState.WithProjectCompilationOptions(projectId, options), 500var stateChange = this.SolutionState.WithProjectParseOptions(projectId, options); 526this.SolutionState.WithHasAllInformation(projectId, hasAllInformation), 536this.SolutionState.WithRunAnalyzers(projectId, runAnalyzers), 546this.SolutionState.WithHasSdkCodeStyleAnalyzers(projectId, hasSdkCodeStyleAnalyzers), 556this.SolutionState.WithProjectDocumentsOrder(projectId, documentIds), 565var oldProject = SolutionState.GetRequiredProjectState(projectId); 601var oldProjectState = SolutionState.GetRequiredProjectState(projectId); 663this.SolutionState.AddProjectReferences(projectId, projectReferences), 672this.SolutionState.RemoveProjectReference(projectId, projectReference), 682this.SolutionState.WithProjectReferences(projectId, projectReferences), 692this.SolutionState.AddMetadataReferences(projectId, metadataReferences), 701this.SolutionState.RemoveMetadataReference(projectId, metadataReference), 711this.SolutionState.WithProjectMetadataReferences(projectId, metadataReferences), 721return Branch(this.SolutionState.AddAnalyzerReferences(analyzerReferences)); 729return Branch(this.SolutionState.RemoveAnalyzerReference(analyzerReference)); 737return Branch(this.SolutionState.WithAnalyzerReferences(analyzerReferences)); 745this.SolutionState.WithProjectAnalyzerReferences(projectId, analyzerReferences), 778SolutionState.WithDocumentAttributes(documentId, arg, updateAttributes), documentId); 842var oldProjectState = SolutionState.GetRequiredProjectState(projectId); 881var oldProjectState = newCompilationState.SolutionState.GetRequiredProjectState(projectId); 885var stateChange = newCompilationState.SolutionState.ForkProject( 940this.SolutionState.WithDocumentState(documentState), documentState.Id); 948this.SolutionState.WithAdditionalDocumentText(documentId, text, mode), documentId); 955return UpdateAnalyzerConfigDocumentState(this.SolutionState.WithAnalyzerConfigDocumentText(documentId, text, mode)); 960=> Branch(SolutionState.WithFallbackAnalyzerOptions(options)); 967this.SolutionState.WithDocumentText(documentId, textAndVersion, mode), documentId); 975this.SolutionState.WithAdditionalDocumentText(documentId, textAndVersion, mode), documentId); 983this.SolutionState.WithAnalyzerConfigDocumentText(documentId, textAndVersion, mode)); 1045this.SolutionState.WithDocumentSourceCodeKind(documentId, sourceCodeKind), documentId); 1052var stateChange = this.SolutionState.UpdateDocumentTextLoader(documentId, loader, mode); 1056Debug.Assert(stateChange.NewSolutionState != this.SolutionState); 1067var stateChange = this.SolutionState.UpdateAdditionalDocumentTextLoader(documentId, loader, mode); 1071Debug.Assert(stateChange.NewSolutionState != this.SolutionState); 1082var stateChange = this.SolutionState.UpdateAnalyzerConfigDocumentTextLoader(documentId, loader, mode); 1086Debug.Assert(stateChange.NewSolutionState != this.SolutionState); 1167tracker = RoslynImmutableInterlocked.GetOrAdd(ref _projectIdToTrackerMap, projectId, s_createCompilationTrackerFunction, this.SolutionState); 1181this.SolutionState.CheckContainsProject(projectId); 1198return GetCompilationAsync(this.SolutionState.GetProjectState(projectId)!, cancellationToken); 1359this.SolutionState.GetProjectDependencyGraph(), 1375this.SolutionState, 1424var projectState = this.SolutionState.GetRequiredProjectState(documentIdentity.DocumentId.ProjectId); 1453this.SolutionState.GetProjectDependencyGraph(), 1474(documentStatesByProjectId, this.SolutionState), 1480this.SolutionState, 1488this.SolutionState.WithNewWorkspace(workspaceKind, workspaceVersion, services)); 1494this.SolutionState.WithOptions(options)); 1539this.SolutionState, 1551var dependencyGraph = SolutionState.CreateDependencyGraph(this.SolutionState.ProjectIds, sortedNewProjectStates); 1553var newState = this.SolutionState.Branch( 1575using var _ = ArrayBuilder<ProjectState>.GetInstance(this.SolutionState.SortedProjectStates.Length, out var newSortedProjectStatesBuilder); 1576newSortedProjectStatesBuilder.AddRange(this.SolutionState.SortedProjectStates); 1588var oldProjectState = this.SolutionState.GetRequiredProjectState(projectId); 1594oldTracker = CreateCompilationTracker(projectId, this.SolutionState); 1619var newProjectStates = projectStateChanged ? newSortedProjectStatesBuilder.ToImmutableAndClear() : this.SolutionState.SortedProjectStates; 1643var currentDocumentState = this.SolutionState.GetRequiredDocumentState(documentId); 1681var allDocumentIds = this.SolutionState.GetRelatedDocumentIds(documentId, includeDifferentLanguages); 1693var allDocumentIds = @this.SolutionState.GetRelatedDocumentIds(documentId, includeDifferentLanguages); 1702var documentState = @this.SolutionState.GetRequiredDocumentState(currentDocumentId); 1730var oldProjectState = currentState.SolutionState.GetRequiredProjectState(documentId.ProjectId); 1774SolutionState.CheckContainsProject(projectId); 1775var projectState = SolutionState.GetRequiredProjectState(projectId); 1808var oldProjectState = SolutionState.GetRequiredProjectState(projectId); 1821var stateChange = SolutionState.ForkProject( 1853this.SolutionState.CheckContainsProject(projectToUpdate); 1864var projectToUpdateState = this.SolutionState.GetRequiredProjectState(projectToUpdate); 1869new(this.SolutionState, projectToUpdateState, projectToUpdateState), 1894var documentState = this.SolutionState.GetProjectState(documentId.ProjectId)?.DocumentStates.GetState(documentId);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (3)
499var referencedProject = compilationState.SolutionState.GetProjectState(projectReference.ProjectId); 1050if (compilationState.SolutionState.ContainsProject(dependentProjectReference.ProjectId)) 1087if (compilationState.SolutionState.ContainsProject(dependentProjectReference.ProjectId))
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (2)
82var solution = compilationState.SolutionState; 272var telemetryCollector = compilationState.SolutionState.Services.GetService<ISourceGeneratorTelemetryCollectorWorkspaceService>();
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (1)
204var services = compilationState.SolutionState.Services;
Workspace\Solution\SolutionCompilationState.SymbolToProjectId.cs (1)
24var projectState = this.SolutionState.GetProjectState(documentId.ProjectId);
Workspace\Solution\SolutionCompilationState_Checksum.cs (6)
23/// <see cref="SolutionState"/>, as well as the checksums for <see cref="FrozenSourceGeneratedDocumentStates"/> 109using (Logger.LogBlock(FunctionId.SolutionCompilationState_ComputeChecksumsAsync, this.SolutionState.FilePath, cancellationToken)) 116solutionStateChecksum = await this.SolutionState.GetChecksumAsync(cancellationToken).ConfigureAwait(false); 121var stateChecksums = await this.SolutionState.GetStateChecksumsAsync(projectId, cancellationToken).ConfigureAwait(false); 126var serializer = this.SolutionState.Services.GetRequiredService<ISerializerService>(); 156foreach (var projectState in this.SolutionState.SortedProjectStates)
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (1)
106var projectState = this.SolutionState.GetRequiredProjectState(projectId);
Workspace\Solution\StateChecksums.cs (1)
169var solutionState = compilationState.SolutionState;