1 write to CompilationState
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\Solution.cs (1)
50CompilationState = compilationState;
99 references to CompilationState
Microsoft.CodeAnalysis.Workspaces (99)
ExternalAccess\UnitTesting\Api\UnitTestingSolutionExtensions.cs (1)
16=> new UnitTestingChecksumWrapper(await solution.CompilationState.GetChecksumAsync(cancellationToken).ConfigureAwait(false));
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (1)
59var sourceGeneratorDocumentStates = await project.Solution.CompilationState.GetSourceGeneratedDocumentStatesAsync(project.State, cancellationToken).ConfigureAwait(false);
Remote\IRemoteKeepAliveService.cs (2)
101=> new(solution.CompilationState, listener); 110=> CreateAsync(solution.CompilationState, cancellationToken);
Remote\RemoteHostClient.cs (1)
108return TryInvokeAsync(solution.CompilationState, invocation, cancellationToken);
Remote\RemoteServiceConnection.cs (10)
56=> TryInvokeAsync(solution.CompilationState, invocation, cancellationToken); 62=> TryInvokeAsync(solution.CompilationState, invocation, cancellationToken); 82=> TryInvokeAsync(project.Solution.CompilationState, project.Id, invocation, cancellationToken); 88=> TryInvokeAsync(project.Solution.CompilationState, project.Id, invocation, cancellationToken); 106=> TryInvokeAsync(solution.CompilationState, invocation, cancellationToken); 112=> TryInvokeAsync(solution.CompilationState, invocation, cancellationToken); 132=> TryInvokeAsync(project.Solution.CompilationState, project.Id, invocation, cancellationToken); 138=> TryInvokeAsync(project.Solution.CompilationState, project.Id, invocation, cancellationToken); 153=> TryInvokeAsync(solution1.CompilationState, solution2.CompilationState, invocation, cancellationToken);
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
313var hadCompilation = solution.CompilationState.TryGetCompilation(projectId, out _);
Workspace\Solution\Project.cs (11)
287var generatedDocumentStates = await Solution.CompilationState.GetSourceGeneratedDocumentStatesAsync(this.State, cancellationToken).ConfigureAwait(false); 319var generatedDocumentStates = await Solution.CompilationState.GetSourceGeneratedDocumentStatesAsync(State, cancellationToken).ConfigureAwait(false); 355var documentState = Solution.CompilationState.TryGetSourceGeneratedDocumentStateForAlreadyGeneratedId(documentId); 364return Solution.CompilationState.GetSourceGeneratorDiagnosticsAsync(this.State, cancellationToken); 369return Solution.CompilationState.GetSourceGeneratorRunResultAsync(this.State, cancellationToken); 483=> Solution.CompilationState.TryGetCompilation(this.Id, out compilation); 494=> Solution.CompilationState.GetCompilationAsync(State, cancellationToken); 501=> Solution.CompilationState.HasSuccessfullyLoadedAsync(State, cancellationToken); 531=> Solution.CompilationState.GetDependentVersionAsync(this.Id, cancellationToken); 538=> Solution.CompilationState.GetDependentSemanticVersionAsync(this.Id, cancellationToken); 573=> Solution.CompilationState.GetDependentChecksumAsync(this.Id, cancellationToken);
Workspace\Solution\Solution.cs (71)
70internal SolutionState SolutionState => CompilationState.SolutionState; 76internal bool PartialSemanticsEnabled => CompilationState.PartialSemanticsEnabled; 194=> CompilationState.GetOriginatingProjectInfo(symbol)?.ProjectId; 206=> CompilationState.GetOriginatingProjectInfo(symbol)?.Compilation; 232=> CompilationState.GetDocumentState(syntaxTree, projectId)?.Id; 320var documentState = CompilationState.GetDocumentState(syntaxTree, projectId); 341=> compilationState == CompilationState ? this : new Solution(compilationState); 369=> WithCompilationState(CompilationState.AddProjects(projectInfos)); 381=> WithCompilationState(CompilationState.RemoveProjects(projectIds)); 396return WithCompilationState(CompilationState.WithProjectAssemblyName(projectId, assemblyName)); 406return WithCompilationState(CompilationState.WithProjectOutputFilePath(projectId, outputFilePath)); 416return WithCompilationState(CompilationState.WithProjectOutputRefFilePath(projectId, outputRefFilePath)); 426return WithCompilationState(CompilationState.WithProjectCompilationOutputInfo(projectId, info)); 436return WithCompilationState(CompilationState.WithProjectDefaultNamespace(projectId, defaultNamespace)); 446return WithCompilationState(CompilationState.WithProjectChecksumAlgorithm(projectId, checksumAlgorithm)); 461return WithCompilationState(CompilationState.WithProjectName(projectId, name)); 471return WithCompilationState(CompilationState.WithProjectFilePath(projectId, filePath)); 487return WithCompilationState(CompilationState.WithProjectCompilationOptions(projectId, options)); 503return WithCompilationState(CompilationState.WithProjectParseOptions(projectId, options)); 510=> WithCompilationState(CompilationState.WithFallbackAnalyzerOptions(options)); 521return WithCompilationState(CompilationState.WithHasAllInformation(projectId, hasAllInformation)); 533return WithCompilationState(CompilationState.WithRunAnalyzers(projectId, runAnalyzers)); 544return WithCompilationState(CompilationState.WithHasSdkCodeStyleAnalyzers(projectId, hasSdkCodeStyleAnalyzers)); 565return WithCompilationState(CompilationState.WithProjectDocumentsOrder(projectId, documentIds)); 574return WithCompilationState(CompilationState.WithProjectAttributes(attributes)); 583return WithCompilationState(CompilationState.WithProjectInfo(info)); 630return WithCompilationState(CompilationState.AddProjectReferences(projectId, collection)); 653return WithCompilationState(CompilationState.RemoveProjectReference(projectId, projectReference)); 681return WithCompilationState(CompilationState.WithProjectReferences(projectId, collection)); 723return WithCompilationState(CompilationState.AddMetadataReferences(projectId, collection)); 745return WithCompilationState(CompilationState.RemoveMetadataReference(projectId, metadataReference)); 762return WithCompilationState(CompilationState.WithProjectMetadataReferences(projectId, collection)); 810return WithCompilationState(CompilationState.WithProjectAnalyzerReferences(projectId, boxedReferences)); 839return WithCompilationState(CompilationState.WithProjectAnalyzerReferences(projectId, builder.MoveToImmutable())); 856return WithCompilationState(CompilationState.WithProjectAnalyzerReferences(projectId, collection)); 890return WithCompilationState(CompilationState.AddAnalyzerReferences(collection)); 907return WithCompilationState(CompilationState.RemoveAnalyzerReference(analyzerReference)); 919return WithCompilationState(CompilationState.WithAnalyzerReferences(collection)); 1032=> WithCompilationState(CompilationState.AddDocumentsToMultipleProjects<DocumentState>(documentInfos)); 1070=> WithCompilationState(CompilationState.AddDocumentsToMultipleProjects<AdditionalDocumentState>(documentInfos)); 1122=> WithCompilationState(CompilationState.AddDocumentsToMultipleProjects<AnalyzerConfigDocumentState>(documentInfos)); 1143=> WithCompilationState(CompilationState.RemoveDocumentsFromMultipleProjects<DocumentState>(documentIds)); 1164=> WithCompilationState(CompilationState.RemoveDocumentsFromMultipleProjects<AdditionalDocumentState>(documentIds)); 1185=> WithCompilationState(CompilationState.RemoveDocumentsFromMultipleProjects<AnalyzerConfigDocumentState>(documentIds)); 1199return WithCompilationState(CompilationState.WithDocumentAttributes( 1215return WithCompilationState(CompilationState.WithDocumentAttributes( 1228return WithCompilationState(CompilationState.WithDocumentAttributes( 1254return WithCompilationState(CompilationState.WithDocumentTexts(texts, mode)); 1275return WithCompilationState(CompilationState.WithAdditionalDocumentText(documentId, text, mode)); 1296return WithCompilationState(CompilationState.WithAnalyzerConfigDocumentText(documentId, text, mode)); 1317return WithCompilationState(CompilationState.WithDocumentText(documentId, textAndVersion, mode)); 1338return WithCompilationState(CompilationState.WithAdditionalDocumentText(documentId, textAndVersion, mode)); 1359return WithCompilationState(CompilationState.WithAnalyzerConfigDocumentText(documentId, textAndVersion, mode)); 1383return WithCompilationState(CompilationState.WithDocumentSyntaxRoots(syntaxRoots, mode)); 1387=> WithCompilationState(CompilationState.WithDocumentContentsFrom([(documentId, documentState)], forceEvenIfTreesWouldDiffer)); 1390=> WithCompilationState(CompilationState.WithDocumentContentsFrom(documentIdsAndStates, forceEvenIfTreesWouldDiffer)); 1412return WithCompilationState(CompilationState.WithDocumentSourceCodeKind(documentId, sourceCodeKind)); 1433return WithCompilationState(CompilationState.UpdateDocumentTextLoader(documentId, loader, mode)); 1454return WithCompilationState(CompilationState.UpdateAdditionalDocumentTextLoader(documentId, loader, mode)); 1475return WithCompilationState(CompilationState.UpdateAnalyzerConfigDocumentTextLoader(documentId, loader, mode)); 1495var newCompilationState = this.CompilationState.WithFrozenPartialCompilations(cancellationToken); 1523lazySolution = CreateLazyFrozenSolution(this.CompilationState, documentId); 1576=> WithCompilationState(CompilationState.WithNewWorkspace(workspaceKind, workspaceVersion, services)); 1609return WithCompilationState(CompilationState.WithDocumentText(documentIds, text, mode)); 1620var newCompilationState = CompilationState.WithFrozenSourceGeneratedDocuments([(documentIdentity, generationDateTime, text)]); 1631=> WithCompilationState(CompilationState.WithFrozenSourceGeneratedDocuments(documents)); 1635=> WithCompilationState(CompilationState.UpdateSpecificSourceGeneratorExecutionVersions(sourceGeneratorExecutionVersionMap)); 1642=> WithCompilationState(CompilationState.WithoutFrozenSourceGeneratedDocuments()); 1653=> WithCompilationState(CompilationState.WithCachedSourceGeneratorState(projectToUpdate, projectWithCachedGeneratorState)); 1722=> WithCompilationState(CompilationState.WithOptions(options)); 1873=> this.CompilationState.SourceGeneratorExecutionVersionMap[projectId];
Workspace\Solution\SolutionCompilationState.cs (1)
1734if (!projectWithCachedGeneratorState.Solution.CompilationState.TryGetCompilationTracker(projectWithCachedGeneratorState.Id, out var tracker) ||