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