1 write to SolutionState
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\SolutionCompilationState.cs (1)
70SolutionState = solution;
106 references to SolutionState
Microsoft.CodeAnalysis.Remote.ServiceHub (6)
Host\RemoteWorkspace.SolutionCreator.cs (1)
51var oldSolutionChecksums = await solution.CompilationState.SolutionState.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false);
Host\SolutionAssetCache.cs (1)
178var solutionState = compilationState.SolutionState;
Host\TestUtils.cs (4)
201var solutionChecksums = await solution.CompilationState.SolutionState.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 203await solutionChecksums.FindAsync(solution.CompilationState.SolutionState, projectCone: null, AssetPath.FullLookupForTesting, Flatten(solutionChecksums), callback, map, cancellationToken).ConfigureAwait(false); 213var solutionChecksums = await solution.CompilationState.SolutionState.GetStateChecksumsAsync(projectId, cancellationToken).ConfigureAwait(false); 215await solutionChecksums.FindAsync(solution.CompilationState.SolutionState, projectCone, AssetPath.SolutionAndProjectForTesting(projectId), Flatten(solutionChecksums), callback, map, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces (99)
Workspace\Solution\Solution.cs (1)
69internal 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 (80)
105public SolutionServices Services => this.SolutionState.Services; 115Contract.ThrowIfFalse(this.SolutionState.SortedProjectStates 133if (newSolutionState == this.SolutionState && 173if (stateChange.NewSolutionState == this.SolutionState) 328var newSolutionState = this.SolutionState.AddProjects(projectInfos); 377var newSolutionState = this.SolutionState.RemoveProjects(projectIds); 379var originalDependencyGraph = this.SolutionState.GetProjectDependencyGraph(); 426this.SolutionState.WithProjectAssemblyName(projectId, assemblyName), 437this.SolutionState.WithProjectOutputFilePath(projectId, outputFilePath), 447this.SolutionState.WithProjectOutputRefFilePath(projectId, outputRefFilePath), 457this.SolutionState.WithProjectCompilationOutputInfo(projectId, info), 467this.SolutionState.WithProjectDefaultNamespace(projectId, defaultNamespace), 477this.SolutionState.WithProjectChecksumAlgorithm(projectId, checksumAlgorithm), 488this.SolutionState.WithProjectName(projectId, name), 498this.SolutionState.WithProjectFilePath(projectId, filePath), 508this.SolutionState.WithProjectCompilationOptions(projectId, options), 517var stateChange = this.SolutionState.WithProjectParseOptions(projectId, options); 543this.SolutionState.WithHasAllInformation(projectId, hasAllInformation), 553this.SolutionState.WithRunAnalyzers(projectId, runAnalyzers), 563this.SolutionState.WithHasSdkCodeStyleAnalyzers(projectId, hasSdkCodeStyleAnalyzers), 573this.SolutionState.WithProjectDocumentsOrder(projectId, documentIds), 582var oldProject = SolutionState.GetRequiredProjectState(projectId); 620var projectStateWithUpdatedOptions = newState.SolutionState.GetRequiredProjectState(projectId); 682this.SolutionState.AddProjectReferences(projectId, projectReferences), 691this.SolutionState.RemoveProjectReference(projectId, projectReference), 701this.SolutionState.WithProjectReferences(projectId, projectReferences), 711this.SolutionState.AddMetadataReferences(projectId, metadataReferences), 720this.SolutionState.RemoveMetadataReference(projectId, metadataReference), 730this.SolutionState.WithProjectMetadataReferences(projectId, metadataReferences), 740return Branch(this.SolutionState.AddAnalyzerReferences(analyzerReferences)); 748return Branch(this.SolutionState.RemoveAnalyzerReference(analyzerReference)); 756return Branch(this.SolutionState.WithAnalyzerReferences(analyzerReferences)); 764this.SolutionState.WithProjectAnalyzerReferences(projectId, analyzerReferences), 797SolutionState.WithDocumentAttributes(documentId, arg, updateAttributes), documentId); 861var oldProjectState = SolutionState.GetRequiredProjectState(projectId); 900var oldProjectState = newCompilationState.SolutionState.GetRequiredProjectState(projectId); 904var stateChange = newCompilationState.SolutionState.ForkProject( 959this.SolutionState.WithDocumentState(documentState), documentState.Id); 967this.SolutionState.WithAdditionalDocumentText(documentId, text, mode), documentId); 974return UpdateAnalyzerConfigDocumentState(this.SolutionState.WithAnalyzerConfigDocumentText(documentId, text, mode)); 979=> Branch(SolutionState.WithFallbackAnalyzerOptions(options)); 986this.SolutionState.WithDocumentText(documentId, textAndVersion, mode), documentId); 994this.SolutionState.WithAdditionalDocumentText(documentId, textAndVersion, mode), documentId); 1002this.SolutionState.WithAnalyzerConfigDocumentText(documentId, textAndVersion, mode)); 1064this.SolutionState.WithDocumentSourceCodeKind(documentId, sourceCodeKind), documentId); 1071var stateChange = this.SolutionState.UpdateDocumentTextLoader(documentId, loader, mode); 1075Debug.Assert(stateChange.NewSolutionState != this.SolutionState); 1086var stateChange = this.SolutionState.UpdateAdditionalDocumentTextLoader(documentId, loader, mode); 1090Debug.Assert(stateChange.NewSolutionState != this.SolutionState); 1101var stateChange = this.SolutionState.UpdateAnalyzerConfigDocumentTextLoader(documentId, loader, mode); 1105Debug.Assert(stateChange.NewSolutionState != this.SolutionState); 1186tracker = RoslynImmutableInterlocked.GetOrAdd(ref _projectIdToTrackerMap, projectId, s_createCompilationTrackerFunction, this.SolutionState); 1200this.SolutionState.CheckContainsProject(projectId); 1217return GetCompilationAsync(this.SolutionState.GetProjectState(projectId)!, cancellationToken); 1378this.SolutionState.GetProjectDependencyGraph(), 1394this.SolutionState, 1443var projectState = this.SolutionState.GetRequiredProjectState(documentIdentity.DocumentId.ProjectId); 1472this.SolutionState.GetProjectDependencyGraph(), 1493(documentStatesByProjectId, this.SolutionState), 1499this.SolutionState, 1505=> this.Branch(this.SolutionState.WithNewWorkspaceFrom(oldSolution)); 1508=> this.Branch(this.SolutionState.WithOptions(options)); 1558this.SolutionState, 1571var dependencyGraph = SolutionState.CreateDependencyGraph(this.SolutionState.ProjectIds, sortedNewProjectStates); 1573var newState = this.SolutionState.Branch( 1595using var _ = ArrayBuilder<ProjectState>.GetInstance(this.SolutionState.SortedProjectStates.Length, out var newSortedProjectStatesBuilder); 1596newSortedProjectStatesBuilder.AddRange(this.SolutionState.SortedProjectStates); 1608var oldProjectState = this.SolutionState.GetRequiredProjectState(projectId); 1614oldTracker = CreateCompilationTracker(projectId, this.SolutionState); 1639var newProjectStates = projectStateChanged ? newSortedProjectStatesBuilder.ToImmutableAndClear() : this.SolutionState.SortedProjectStates; 1663var currentDocumentState = this.SolutionState.GetRequiredDocumentState(documentId); 1701var allDocumentIds = this.SolutionState.GetRelatedDocumentIds(documentId, includeDifferentLanguages); 1713var allDocumentIds = @this.SolutionState.GetRelatedDocumentIds(documentId, includeDifferentLanguages); 1722var documentState = @this.SolutionState.GetRequiredDocumentState(currentDocumentId); 1750var oldProjectState = currentState.SolutionState.GetRequiredProjectState(documentId.ProjectId); 1794SolutionState.CheckContainsProject(projectId); 1795var projectState = SolutionState.GetRequiredProjectState(projectId); 1828var oldProjectState = SolutionState.GetRequiredProjectState(projectId); 1841var stateChange = SolutionState.ForkProject( 1885var documentState = this.SolutionState.GetProjectState(documentId.ProjectId)?.DocumentStates.GetState(documentId);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (3)
499var referencedProject = compilationState.SolutionState.GetProjectState(projectReference.ProjectId); 1059if (compilationState.SolutionState.ContainsProject(dependentProjectReference.ProjectId)) 1096if (compilationState.SolutionState.ContainsProject(dependentProjectReference.ProjectId))
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (3)
108var solution = compilationState.SolutionState; 328var telemetryCollector = compilationState.SolutionState.Services.GetService<ISourceGeneratorTelemetryCollectorWorkspaceService>(); 333var telemetryReporter = compilationState.SolutionState.Services.GetService<ISourceGeneratorTelemetryReporterWorkspaceService>();
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (1)
204var services = compilationState.SolutionState.Services;
Workspace\Solution\SolutionCompilationState.SymbolToProjectId.cs (1)
25var projectState = this.SolutionState.GetProjectState(documentId.ProjectId);
Workspace\Solution\SolutionCompilationState_Checksum.cs (6)
22/// <see cref="SolutionState"/>, as well as the checksums for <see cref="FrozenSourceGeneratedDocumentStates"/> 108using (Logger.LogBlock(FunctionId.SolutionCompilationState_ComputeChecksumsAsync, this.SolutionState.FilePath, cancellationToken)) 115solutionStateChecksum = await this.SolutionState.GetChecksumAsync(cancellationToken).ConfigureAwait(false); 120var stateChecksums = await this.SolutionState.GetStateChecksumsAsync(projectId, cancellationToken).ConfigureAwait(false); 125var serializer = this.SolutionState.Services.GetRequiredService<ISerializerService>(); 155foreach (var projectState in this.SolutionState.SortedProjectStates)
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (1)
122var projectState = this.SolutionState.GetRequiredProjectState(projectId);
Workspace\Solution\StateChecksums.cs (1)
169var solutionState = compilationState.SolutionState;
Roslyn.VisualStudio.Next.UnitTests (1)
Remote\SerializationValidator.cs (1)
218Contract.ThrowIfFalse(solution.CompilationState.SolutionState.TryGetStateChecksums(out var solutionObjectFromSolution));