2 writes to DocumentStates
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\Solution\ProjectState.cs (2)
78
DocumentStates
= documentStates;
116
DocumentStates
= new TextDocumentStates<DocumentState>(projectInfoFixed.Documents, info => CreateDocument(info, parseOptions, loadTextOptions));
35 references to DocumentStates
Microsoft.CodeAnalysis.Workspaces (35)
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)
119
_lazyLatestDocumentVersion = AsyncLazy.Create(static (self, c) => ComputeLatestDocumentVersionAsync(self.
DocumentStates
, self.AdditionalDocumentStates, c), arg: this);
120
_lazyLatestDocumentTopLevelChangeVersion = AsyncLazy.Create(static (self, c) => ComputeLatestDocumentTopLevelChangeVersionAsync(self.
DocumentStates
, self.AdditionalDocumentStates, c), arg: this);
132
typeof(TDocumentState) == typeof(DocumentState) ?
DocumentStates
:
140
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)
879
var oldDocumentStates = newDocumentStates.SelectAsArray(static (s, oldProjectState) => oldProjectState.
DocumentStates
.GetRequiredState(s.Id), oldProjectState);
1631
var oldDocumentState = oldProjectState.
DocumentStates
.GetState(documentId);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (4)
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())
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))
1245
var documentState = projectState.
DocumentStates
.GetState(documentId);
1299
var documentState = projectState.
DocumentStates
.GetState(documentId);
1333
return projectState.
DocumentStates
.Contains(documentId);
Workspace\Workspace.cs (2)
1759
var document = projectChanges.OldProject.State.
DocumentStates
.GetState(documentId) ??
1760
projectChanges.NewProject.State.
DocumentStates
.GetState(documentId)!;