1 write to CompilationState
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\Solution.cs (1)
50
CompilationState
= 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)
59
var 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)
108
return 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)
313
var hadCompilation = solution.
CompilationState
.TryGetCompilation(projectId, out _);
Workspace\Solution\Project.cs (11)
287
var generatedDocumentStates = await Solution.
CompilationState
.GetSourceGeneratedDocumentStatesAsync(this.State, cancellationToken).ConfigureAwait(false);
319
var generatedDocumentStates = await Solution.
CompilationState
.GetSourceGeneratedDocumentStatesAsync(State, cancellationToken).ConfigureAwait(false);
355
var documentState = Solution.
CompilationState
.TryGetSourceGeneratedDocumentStateForAlreadyGeneratedId(documentId);
364
return Solution.
CompilationState
.GetSourceGeneratorDiagnosticsAsync(this.State, cancellationToken);
369
return 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)
70
internal SolutionState SolutionState =>
CompilationState
.SolutionState;
76
internal bool PartialSemanticsEnabled =>
CompilationState
.PartialSemanticsEnabled;
194
=>
CompilationState
.GetOriginatingProjectInfo(symbol)?.ProjectId;
206
=>
CompilationState
.GetOriginatingProjectInfo(symbol)?.Compilation;
232
=>
CompilationState
.GetDocumentState(syntaxTree, projectId)?.Id;
320
var documentState =
CompilationState
.GetDocumentState(syntaxTree, projectId);
341
=> compilationState ==
CompilationState
? this : new Solution(compilationState);
369
=> WithCompilationState(
CompilationState
.AddProjects(projectInfos));
381
=> WithCompilationState(
CompilationState
.RemoveProjects(projectIds));
396
return WithCompilationState(
CompilationState
.WithProjectAssemblyName(projectId, assemblyName));
406
return WithCompilationState(
CompilationState
.WithProjectOutputFilePath(projectId, outputFilePath));
416
return WithCompilationState(
CompilationState
.WithProjectOutputRefFilePath(projectId, outputRefFilePath));
426
return WithCompilationState(
CompilationState
.WithProjectCompilationOutputInfo(projectId, info));
436
return WithCompilationState(
CompilationState
.WithProjectDefaultNamespace(projectId, defaultNamespace));
446
return WithCompilationState(
CompilationState
.WithProjectChecksumAlgorithm(projectId, checksumAlgorithm));
461
return WithCompilationState(
CompilationState
.WithProjectName(projectId, name));
471
return WithCompilationState(
CompilationState
.WithProjectFilePath(projectId, filePath));
487
return WithCompilationState(
CompilationState
.WithProjectCompilationOptions(projectId, options));
503
return WithCompilationState(
CompilationState
.WithProjectParseOptions(projectId, options));
510
=> WithCompilationState(
CompilationState
.WithFallbackAnalyzerOptions(options));
521
return WithCompilationState(
CompilationState
.WithHasAllInformation(projectId, hasAllInformation));
533
return WithCompilationState(
CompilationState
.WithRunAnalyzers(projectId, runAnalyzers));
544
return WithCompilationState(
CompilationState
.WithHasSdkCodeStyleAnalyzers(projectId, hasSdkCodeStyleAnalyzers));
565
return WithCompilationState(
CompilationState
.WithProjectDocumentsOrder(projectId, documentIds));
574
return WithCompilationState(
CompilationState
.WithProjectAttributes(attributes));
583
return WithCompilationState(
CompilationState
.WithProjectInfo(info));
630
return WithCompilationState(
CompilationState
.AddProjectReferences(projectId, collection));
653
return WithCompilationState(
CompilationState
.RemoveProjectReference(projectId, projectReference));
681
return WithCompilationState(
CompilationState
.WithProjectReferences(projectId, collection));
723
return WithCompilationState(
CompilationState
.AddMetadataReferences(projectId, collection));
745
return WithCompilationState(
CompilationState
.RemoveMetadataReference(projectId, metadataReference));
762
return WithCompilationState(
CompilationState
.WithProjectMetadataReferences(projectId, collection));
810
return WithCompilationState(
CompilationState
.WithProjectAnalyzerReferences(projectId, boxedReferences));
839
return WithCompilationState(
CompilationState
.WithProjectAnalyzerReferences(projectId, builder.MoveToImmutable()));
856
return WithCompilationState(
CompilationState
.WithProjectAnalyzerReferences(projectId, collection));
890
return WithCompilationState(
CompilationState
.AddAnalyzerReferences(collection));
907
return WithCompilationState(
CompilationState
.RemoveAnalyzerReference(analyzerReference));
919
return 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));
1199
return WithCompilationState(
CompilationState
.WithDocumentAttributes(
1215
return WithCompilationState(
CompilationState
.WithDocumentAttributes(
1228
return WithCompilationState(
CompilationState
.WithDocumentAttributes(
1254
return WithCompilationState(
CompilationState
.WithDocumentTexts(texts, mode));
1275
return WithCompilationState(
CompilationState
.WithAdditionalDocumentText(documentId, text, mode));
1296
return WithCompilationState(
CompilationState
.WithAnalyzerConfigDocumentText(documentId, text, mode));
1317
return WithCompilationState(
CompilationState
.WithDocumentText(documentId, textAndVersion, mode));
1338
return WithCompilationState(
CompilationState
.WithAdditionalDocumentText(documentId, textAndVersion, mode));
1359
return WithCompilationState(
CompilationState
.WithAnalyzerConfigDocumentText(documentId, textAndVersion, mode));
1383
return WithCompilationState(
CompilationState
.WithDocumentSyntaxRoots(syntaxRoots, mode));
1387
=> WithCompilationState(
CompilationState
.WithDocumentContentsFrom([(documentId, documentState)], forceEvenIfTreesWouldDiffer));
1390
=> WithCompilationState(
CompilationState
.WithDocumentContentsFrom(documentIdsAndStates, forceEvenIfTreesWouldDiffer));
1412
return WithCompilationState(
CompilationState
.WithDocumentSourceCodeKind(documentId, sourceCodeKind));
1433
return WithCompilationState(
CompilationState
.UpdateDocumentTextLoader(documentId, loader, mode));
1454
return WithCompilationState(
CompilationState
.UpdateAdditionalDocumentTextLoader(documentId, loader, mode));
1475
return WithCompilationState(
CompilationState
.UpdateAnalyzerConfigDocumentTextLoader(documentId, loader, mode));
1495
var newCompilationState = this.
CompilationState
.WithFrozenPartialCompilations(cancellationToken);
1523
lazySolution = CreateLazyFrozenSolution(this.
CompilationState
, documentId);
1576
=> WithCompilationState(
CompilationState
.WithNewWorkspace(workspaceKind, workspaceVersion, services));
1609
return WithCompilationState(
CompilationState
.WithDocumentText(documentIds, text, mode));
1620
var 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)
1734
if (!projectWithCachedGeneratorState.Solution.
CompilationState
.TryGetCompilationTracker(projectWithCachedGeneratorState.Id, out var tracker) ||