2 writes to DocumentStates
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\Solution\ProjectState.cs (2)
79
DocumentStates
= documentStates;
120
DocumentStates
= new TextDocumentStates<DocumentState>(projectInfoFixed.Documents, info => CreateDocument(info, parseOptions, loadTextOptions));
36 references to DocumentStates
Microsoft.CodeAnalysis.Workspaces (36)
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (1)
58
var regularDocumentStates = project.State.
DocumentStates
;
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
94
var textChecksumsTasks = projectState.
DocumentStates
.States.Values.OrderBy(state => state.FilePath, StringComparer.Ordinal).Select(async state =>
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
304
foreach (var (_, documentState) in projectState.
DocumentStates
.States)
Workspace\Solution\Project.cs (4)
175
public bool HasDocuments => !State.
DocumentStates
.IsEmpty;
180
public IReadOnlyList<DocumentId> DocumentIds => State.
DocumentStates
.Ids;
212
=> State.
DocumentStates
.Contains(documentId);
466
(documentId, project) => project.State.
DocumentStates
.TryGetState(documentId, out var state) ? new Document(project, state) : null;
Workspace\Solution\ProjectChanges.cs (6)
100
=> NewProject.State.
DocumentStates
.GetAddedStateIds(OldProject.State.
DocumentStates
);
130
=> NewProject.State.
DocumentStates
.GetChangedStateIds(OldProject.State.
DocumentStates
, onlyGetDocumentsWithTextChanges, ignoreUnchangeableDocuments);
150
=> NewProject.State.
DocumentStates
.GetRemovedStateIds(OldProject.State.
DocumentStates
);
Workspace\Solution\ProjectState.cs (4)
123
_lazyLatestDocumentVersion = AsyncLazy.Create(static (self, c) => ComputeLatestDocumentVersionAsync(self.
DocumentStates
, self.AdditionalDocumentStates, c), arg: this);
124
_lazyLatestDocumentTopLevelChangeVersion = AsyncLazy.Create(static (self, c) => ComputeLatestDocumentTopLevelChangeVersionAsync(self.
DocumentStates
, self.AdditionalDocumentStates, c), arg: this);
139
typeof(TDocumentState) == typeof(DocumentState) ?
DocumentStates
:
147
foreach (var (documentId, documentState) in this.
DocumentStates
.States)
Workspace\Solution\ProjectState_Checksum.cs (1)
47
var documentChecksumsTask =
DocumentStates
.GetDocumentChecksumsAndIdsAsync(cancellationToken);
Workspace\Solution\SolutionCompilationState.cs (2)
901
var oldDocumentStates = newDocumentStates.SelectAsArray(static (s, oldProjectState) => oldProjectState.
DocumentStates
.GetRequiredState(s.Id), oldProjectState);
1630
var oldDocumentState = oldProjectState.
DocumentStates
.GetState(documentId);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (5)
33
state => string.Join(",", state.AssemblyName, state.
DocumentStates
.Count);
323
foreach (var chunk in this.ProjectState.
DocumentStates
.GetStatesInCompilationOrder().Chunk(TranslationAction.AddDocumentsAction.AddDocumentsBatchSize))
767
foreach (var documentState in this.ProjectState.
DocumentStates
.GetStatesInCompilationOrder())
955
capacity: projectState.
DocumentStates
.Count + generatorInfo?.Documents.Count ?? 0
959
foreach (var documentInProjectState in projectState.
DocumentStates
.States)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (1)
255
foreach (var documentState in ProjectState.
DocumentStates
.States)
Workspace\Solution\SolutionCompilationState.SymbolToProjectId.cs (1)
27
var document = projectState.
DocumentStates
.GetState(documentId);
Workspace\Solution\SolutionState.cs (7)
276
this.GetProjectState(documentId.ProjectId)!.
DocumentStates
.Contains(documentId);
302
=> GetRequiredProjectState(documentId.ProjectId).
DocumentStates
.GetRequiredState(documentId);
808
if (documentIds.Count != oldProject.
DocumentStates
.Count)
815
if (!oldProject.
DocumentStates
.Contains(id))
1280
var documentState = projectState.
DocumentStates
.GetState(documentId);
1334
var documentState = projectState.
DocumentStates
.GetState(documentId);
1368
return projectState.
DocumentStates
.Contains(documentId);
Workspace\Workspace.cs (2)
1717
var document = projectChanges.OldProject.State.
DocumentStates
.GetState(documentId) ??
1718
projectChanges.NewProject.State.
DocumentStates
.GetState(documentId)!;