1 write to SolutionState
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\SolutionCompilationState.cs (1)
70
SolutionState
= solution;
99 references to SolutionState
Microsoft.CodeAnalysis.Workspaces (99)
Workspace\Solution\Solution.cs (1)
69
internal SolutionState SolutionState => CompilationState.
SolutionState
;
Workspace\Solution\SolutionCompilationState_Checksum.cs (6)
22
/// <see cref="
SolutionState
"/>, as well as the checksums for <see cref="FrozenSourceGeneratedDocumentStates"/>
108
using (Logger.LogBlock(FunctionId.SolutionCompilationState_ComputeChecksumsAsync, this.
SolutionState
.FilePath, cancellationToken))
115
solutionStateChecksum = await this.
SolutionState
.GetChecksumAsync(cancellationToken).ConfigureAwait(false);
120
var stateChecksums = await this.
SolutionState
.GetStateChecksumsAsync(projectId, cancellationToken).ConfigureAwait(false);
125
var serializer = this.
SolutionState
.Services.GetRequiredService<ISerializerService>();
155
foreach (var projectState in this.
SolutionState
.SortedProjectStates)
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (1)
122
var projectState = this.
SolutionState
.GetRequiredProjectState(projectId);
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)
105
public SolutionServices Services => this.
SolutionState
.Services;
115
Contract.ThrowIfFalse(this.
SolutionState
.SortedProjectStates
133
if (newSolutionState == this.
SolutionState
&&
173
if (stateChange.NewSolutionState == this.
SolutionState
)
328
var newSolutionState = this.
SolutionState
.AddProjects(projectInfos);
377
var newSolutionState = this.
SolutionState
.RemoveProjects(projectIds);
379
var originalDependencyGraph = this.
SolutionState
.GetProjectDependencyGraph();
426
this.
SolutionState
.WithProjectAssemblyName(projectId, assemblyName),
437
this.
SolutionState
.WithProjectOutputFilePath(projectId, outputFilePath),
447
this.
SolutionState
.WithProjectOutputRefFilePath(projectId, outputRefFilePath),
457
this.
SolutionState
.WithProjectCompilationOutputInfo(projectId, info),
467
this.
SolutionState
.WithProjectDefaultNamespace(projectId, defaultNamespace),
477
this.
SolutionState
.WithProjectChecksumAlgorithm(projectId, checksumAlgorithm),
488
this.
SolutionState
.WithProjectName(projectId, name),
498
this.
SolutionState
.WithProjectFilePath(projectId, filePath),
508
this.
SolutionState
.WithProjectCompilationOptions(projectId, options),
517
var stateChange = this.
SolutionState
.WithProjectParseOptions(projectId, options);
543
this.
SolutionState
.WithHasAllInformation(projectId, hasAllInformation),
553
this.
SolutionState
.WithRunAnalyzers(projectId, runAnalyzers),
563
this.
SolutionState
.WithHasSdkCodeStyleAnalyzers(projectId, hasSdkCodeStyleAnalyzers),
573
this.
SolutionState
.WithProjectDocumentsOrder(projectId, documentIds),
582
var oldProject =
SolutionState
.GetRequiredProjectState(projectId);
620
var projectStateWithUpdatedOptions = newState.
SolutionState
.GetRequiredProjectState(projectId);
682
this.
SolutionState
.AddProjectReferences(projectId, projectReferences),
691
this.
SolutionState
.RemoveProjectReference(projectId, projectReference),
701
this.
SolutionState
.WithProjectReferences(projectId, projectReferences),
711
this.
SolutionState
.AddMetadataReferences(projectId, metadataReferences),
720
this.
SolutionState
.RemoveMetadataReference(projectId, metadataReference),
730
this.
SolutionState
.WithProjectMetadataReferences(projectId, metadataReferences),
740
return Branch(this.
SolutionState
.AddAnalyzerReferences(analyzerReferences));
748
return Branch(this.
SolutionState
.RemoveAnalyzerReference(analyzerReference));
756
return Branch(this.
SolutionState
.WithAnalyzerReferences(analyzerReferences));
764
this.
SolutionState
.WithProjectAnalyzerReferences(projectId, analyzerReferences),
797
SolutionState
.WithDocumentAttributes(documentId, arg, updateAttributes), documentId);
861
var oldProjectState =
SolutionState
.GetRequiredProjectState(projectId);
900
var oldProjectState = newCompilationState.
SolutionState
.GetRequiredProjectState(projectId);
904
var stateChange = newCompilationState.
SolutionState
.ForkProject(
959
this.
SolutionState
.WithDocumentState(documentState), documentState.Id);
967
this.
SolutionState
.WithAdditionalDocumentText(documentId, text, mode), documentId);
974
return UpdateAnalyzerConfigDocumentState(this.
SolutionState
.WithAnalyzerConfigDocumentText(documentId, text, mode));
979
=> Branch(
SolutionState
.WithFallbackAnalyzerOptions(options));
986
this.
SolutionState
.WithDocumentText(documentId, textAndVersion, mode), documentId);
994
this.
SolutionState
.WithAdditionalDocumentText(documentId, textAndVersion, mode), documentId);
1002
this.
SolutionState
.WithAnalyzerConfigDocumentText(documentId, textAndVersion, mode));
1064
this.
SolutionState
.WithDocumentSourceCodeKind(documentId, sourceCodeKind), documentId);
1071
var stateChange = this.
SolutionState
.UpdateDocumentTextLoader(documentId, loader, mode);
1075
Debug.Assert(stateChange.NewSolutionState != this.
SolutionState
);
1086
var stateChange = this.
SolutionState
.UpdateAdditionalDocumentTextLoader(documentId, loader, mode);
1090
Debug.Assert(stateChange.NewSolutionState != this.
SolutionState
);
1101
var stateChange = this.
SolutionState
.UpdateAnalyzerConfigDocumentTextLoader(documentId, loader, mode);
1105
Debug.Assert(stateChange.NewSolutionState != this.
SolutionState
);
1183
tracker = RoslynImmutableInterlocked.GetOrAdd(ref _projectIdToTrackerMap, projectId, s_createCompilationTrackerFunction, this.
SolutionState
);
1197
this.
SolutionState
.CheckContainsProject(projectId);
1214
return GetCompilationAsync(this.
SolutionState
.GetProjectState(projectId)!, cancellationToken);
1375
this.
SolutionState
.GetProjectDependencyGraph(),
1391
this.
SolutionState
,
1440
var projectState = this.
SolutionState
.GetRequiredProjectState(documentIdentity.DocumentId.ProjectId);
1469
this.
SolutionState
.GetProjectDependencyGraph(),
1490
(documentStatesByProjectId, this.
SolutionState
),
1496
this.
SolutionState
,
1502
=> this.Branch(this.
SolutionState
.WithNewWorkspaceFrom(oldSolution));
1505
=> this.Branch(this.
SolutionState
.WithOptions(options));
1555
this.
SolutionState
,
1568
var dependencyGraph = SolutionState.CreateDependencyGraph(this.
SolutionState
.ProjectIds, sortedNewProjectStates);
1570
var newState = this.
SolutionState
.Branch(
1592
using var _ = ArrayBuilder<ProjectState>.GetInstance(this.
SolutionState
.SortedProjectStates.Length, out var newSortedProjectStatesBuilder);
1593
newSortedProjectStatesBuilder.AddRange(this.
SolutionState
.SortedProjectStates);
1605
var oldProjectState = this.
SolutionState
.GetRequiredProjectState(projectId);
1611
oldTracker = CreateCompilationTracker(projectId, this.
SolutionState
);
1636
var newProjectStates = projectStateChanged ? newSortedProjectStatesBuilder.ToImmutableAndClear() : this.
SolutionState
.SortedProjectStates;
1660
var currentDocumentState = this.
SolutionState
.GetRequiredDocumentState(documentId);
1698
var allDocumentIds = this.
SolutionState
.GetRelatedDocumentIds(documentId, includeDifferentLanguages);
1710
var allDocumentIds = @this.
SolutionState
.GetRelatedDocumentIds(documentId, includeDifferentLanguages);
1719
var documentState = @this.
SolutionState
.GetRequiredDocumentState(currentDocumentId);
1747
var oldProjectState = currentState.
SolutionState
.GetRequiredProjectState(documentId.ProjectId);
1791
SolutionState
.CheckContainsProject(projectId);
1792
var projectState =
SolutionState
.GetRequiredProjectState(projectId);
1825
var oldProjectState =
SolutionState
.GetRequiredProjectState(projectId);
1838
var stateChange =
SolutionState
.ForkProject(
1882
var documentState = this.
SolutionState
.GetProjectState(documentId.ProjectId)?.DocumentStates.GetState(documentId);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (3)
108
var solution = compilationState.
SolutionState
;
326
var telemetryCollector = compilationState.
SolutionState
.Services.GetService<ISourceGeneratorTelemetryCollectorWorkspaceService>();
331
var telemetryReporter = compilationState.
SolutionState
.Services.GetService<ISourceGeneratorTelemetryReporterWorkspaceService>();
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (3)
499
var referencedProject = compilationState.
SolutionState
.GetProjectState(projectReference.ProjectId);
1059
if (compilationState.
SolutionState
.ContainsProject(dependentProjectReference.ProjectId))
1096
if (compilationState.
SolutionState
.ContainsProject(dependentProjectReference.ProjectId))
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (1)
204
var services = compilationState.
SolutionState
.Services;
Workspace\Solution\SolutionCompilationState.SymbolToProjectId.cs (1)
25
var projectState = this.
SolutionState
.GetProjectState(documentId.ProjectId);
Workspace\Solution\StateChecksums.cs (1)
169
var solutionState = compilationState.
SolutionState
;