1 write to SolutionState
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\SolutionCompilationState.cs (1)
70SolutionState = solution;
110 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 (103)
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)
106public SolutionServices Services => this.SolutionState.Services; 116Contract.ThrowIfFalse(this.SolutionState.SortedProjectStates 132if (newSolutionState == this.SolutionState && 171if (stateChange.NewSolutionState == this.SolutionState) 179/// except that it will still fork even if newSolutionState is unchanged from <see cref="SolutionState"/>. 332var newSolutionState = this.SolutionState.AddProjects(projectInfos); 372var newSolutionState = this.SolutionState.RemoveProjects(projectIds); 374var originalDependencyGraph = this.SolutionState.GetProjectDependencyGraph(); 416this.SolutionState.WithProjectAssemblyName(projectId, assemblyName), 427this.SolutionState.WithProjectOutputFilePath(projectId, outputFilePath), 437this.SolutionState.WithProjectOutputRefFilePath(projectId, outputRefFilePath), 447this.SolutionState.WithProjectCompilationOutputInfo(projectId, info), 457this.SolutionState.WithProjectDefaultNamespace(projectId, defaultNamespace), 467this.SolutionState.WithProjectChecksumAlgorithm(projectId, checksumAlgorithm), 478this.SolutionState.WithProjectName(projectId, name), 488this.SolutionState.WithProjectFilePath(projectId, filePath), 498this.SolutionState.WithProjectCompilationOptions(projectId, options), 507var stateChange = this.SolutionState.WithProjectParseOptions(projectId, options); 533this.SolutionState.WithHasAllInformation(projectId, hasAllInformation), 543this.SolutionState.WithRunAnalyzers(projectId, runAnalyzers), 553this.SolutionState.WithHasSdkCodeStyleAnalyzers(projectId, hasSdkCodeStyleAnalyzers), 563this.SolutionState.WithProjectDocumentsOrder(projectId, documentIds), 572var oldProject = SolutionState.GetRequiredProjectState(projectId); 608var oldProjectState = SolutionState.GetRequiredProjectState(projectId); 670this.SolutionState.AddProjectReferences(projectId, projectReferences), 679this.SolutionState.RemoveProjectReference(projectId, projectReference), 689this.SolutionState.WithProjectReferences(projectId, projectReferences), 699this.SolutionState.AddMetadataReferences(projectId, metadataReferences), 708this.SolutionState.RemoveMetadataReference(projectId, metadataReference), 718this.SolutionState.WithProjectMetadataReferences(projectId, metadataReferences), 728return Branch(this.SolutionState.AddAnalyzerReferences(analyzerReferences)); 736return Branch(this.SolutionState.RemoveAnalyzerReference(analyzerReference)); 744return Branch(this.SolutionState.WithAnalyzerReferences(analyzerReferences)); 752this.SolutionState.WithProjectAnalyzerReferences(projectId, analyzerReferences), 785SolutionState.WithDocumentAttributes(documentId, arg, updateAttributes), documentId); 849var oldProjectState = SolutionState.GetRequiredProjectState(projectId); 888var oldProjectState = newCompilationState.SolutionState.GetRequiredProjectState(projectId); 892var stateChange = newCompilationState.SolutionState.ForkProject( 947this.SolutionState.WithDocumentState(documentState), documentState.Id); 955this.SolutionState.WithAdditionalDocumentText(documentId, text, mode), documentId); 962return UpdateAnalyzerConfigDocumentState(this.SolutionState.WithAnalyzerConfigDocumentText(documentId, text, mode)); 967=> Branch(SolutionState.WithFallbackAnalyzerOptions(options)); 974this.SolutionState.WithDocumentText(documentId, textAndVersion, mode), documentId); 982this.SolutionState.WithAdditionalDocumentText(documentId, textAndVersion, mode), documentId); 990this.SolutionState.WithAnalyzerConfigDocumentText(documentId, textAndVersion, mode)); 1052this.SolutionState.WithDocumentSourceCodeKind(documentId, sourceCodeKind), documentId); 1059var stateChange = this.SolutionState.UpdateDocumentTextLoader(documentId, loader, mode); 1063Debug.Assert(stateChange.NewSolutionState != this.SolutionState); 1074var stateChange = this.SolutionState.UpdateAdditionalDocumentTextLoader(documentId, loader, mode); 1078Debug.Assert(stateChange.NewSolutionState != this.SolutionState); 1089var stateChange = this.SolutionState.UpdateAnalyzerConfigDocumentTextLoader(documentId, loader, mode); 1093Debug.Assert(stateChange.NewSolutionState != this.SolutionState); 1174tracker = RoslynImmutableInterlocked.GetOrAdd(ref _projectIdToTrackerMap, projectId, s_createCompilationTrackerFunction, this.SolutionState); 1188this.SolutionState.CheckContainsProject(projectId); 1205return GetCompilationAsync(this.SolutionState.GetProjectState(projectId)!, cancellationToken); 1366this.SolutionState.GetProjectDependencyGraph(), 1382this.SolutionState, 1431var projectState = this.SolutionState.GetRequiredProjectState(documentIdentity.DocumentId.ProjectId); 1460this.SolutionState.GetProjectDependencyGraph(), 1481(documentStatesByProjectId, this.SolutionState), 1487this.SolutionState, 1493=> this.Branch(this.SolutionState.WithNewWorkspaceFrom(oldSolution)); 1496=> this.Branch(this.SolutionState.WithOptions(options)); 1545this.SolutionState, 1557var dependencyGraph = SolutionState.CreateDependencyGraph(this.SolutionState.ProjectIds, sortedNewProjectStates); 1559var newState = this.SolutionState.Branch( 1581using var _ = ArrayBuilder<ProjectState>.GetInstance(this.SolutionState.SortedProjectStates.Length, out var newSortedProjectStatesBuilder); 1582newSortedProjectStatesBuilder.AddRange(this.SolutionState.SortedProjectStates); 1594var oldProjectState = this.SolutionState.GetRequiredProjectState(projectId); 1600oldTracker = CreateCompilationTracker(projectId, this.SolutionState); 1625var newProjectStates = projectStateChanged ? newSortedProjectStatesBuilder.ToImmutableAndClear() : this.SolutionState.SortedProjectStates; 1649var currentDocumentState = this.SolutionState.GetRequiredDocumentState(documentId); 1687var allDocumentIds = this.SolutionState.GetRelatedDocumentIds(documentId, includeDifferentLanguages); 1699var allDocumentIds = @this.SolutionState.GetRelatedDocumentIds(documentId, includeDifferentLanguages); 1708var documentState = @this.SolutionState.GetRequiredDocumentState(currentDocumentId); 1736var oldProjectState = currentState.SolutionState.GetRequiredProjectState(documentId.ProjectId); 1780SolutionState.CheckContainsProject(projectId); 1781var projectState = SolutionState.GetRequiredProjectState(projectId); 1814var oldProjectState = SolutionState.GetRequiredProjectState(projectId); 1827var stateChange = SolutionState.ForkProject( 1859this.SolutionState.CheckContainsProject(projectToUpdate); 1870var projectToUpdateState = this.SolutionState.GetRequiredProjectState(projectToUpdate); 1875new(this.SolutionState, projectToUpdateState, projectToUpdateState), 1900var 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 (3)
108var solution = compilationState.SolutionState; 305var telemetryCollector = compilationState.SolutionState.Services.GetService<ISourceGeneratorTelemetryCollectorWorkspaceService>(); 310var 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));