35 references to Id
Microsoft.CodeAnalysis.Workspaces (35)
FindSymbols\Shared\AbstractSyntaxIndex.cs (2)
66
s_documentIdToIndex.AddOrUpdate(document.
Id
, index);
92
if (s_documentIdToIndex.TryGetValue(document.
Id
, out var index) &&
Workspace\Host\PersistentStorage\DocumentKey.cs (1)
37
=> new(projectKey, state.
Id
, state.FilePath, state.Name);
Workspace\Solution\DocumentState.cs (3)
588
BindSyntaxTreeToId(syntaxTree,
Id
);
604
BindSyntaxTreeToId(treeAndVersion.Tree, this.
Id
);
616
BindSyntaxTreeToId(treeAndVersion.Tree, this.
Id
);
Workspace\Solution\Project.cs (1)
328
=> ImmutableInterlocked.GetOrAdd(ref _idToSourceGeneratedDocumentMap, state.
Id
, s_createSourceGeneratedDocumentFunction, (state, this));
Workspace\Solution\ProjectState.cs (6)
889
Debug.Assert(!documents.Any(d => DocumentStates.Contains(d.
Id
)));
901
Debug.Assert(!documents.Any(d => AdditionalDocumentStates.Contains(d.
Id
)));
913
Debug.Assert(!documents.Any(d => AnalyzerConfigDocumentStates.Contains(d.
Id
)));
986
=> UpdateDocuments([DocumentStates.GetRequiredState(newDocument.
Id
)], [newDocument]);
1012
=> UpdateAdditionalDocuments([AdditionalDocumentStates.GetRequiredState(newDocument.
Id
)], [newDocument]);
1037
=> UpdateAnalyzerConfigDocuments([AnalyzerConfigDocumentStates.GetRequiredState(newDocument.
Id
)], [newDocument]);
Workspace\Solution\Solution.cs (4)
232
=> CompilationState.GetDocumentState(syntaxTree, projectId)?.
Id
;
327
var generatedDocument = this.GetRequiredProject(documentState.
Id
.ProjectId).TryGetSourceGeneratedDocumentForAlreadyGeneratedId(documentState.
Id
);
333
return GetDocument(documentState.
Id
)!;
Workspace\Solution\SolutionCompilationState.cs (6)
879
var oldDocumentStates = newDocumentStates.SelectAsArray(static (s, oldProjectState) => oldProjectState.DocumentStates.GetRequiredState(s.
Id
), oldProjectState);
886
var oldDocumentStates = newDocumentStates.SelectAsArray(static (s, oldProjectState) => oldProjectState.AdditionalDocumentStates.GetRequiredState(s.
Id
), oldProjectState);
893
var oldDocumentStates = newDocumentStates.SelectAsArray(static (s, oldProjectState) => oldProjectState.AnalyzerConfigDocumentStates.GetRequiredState(s.
Id
), oldProjectState);
903
this.SolutionState.WithDocumentState(documentState), documentState.
Id
);
1363
var documentStatesByProjectId = documentStates.ToDictionary(static state => state.
Id
.ProjectId);
1629
var documentId = newDocumentState.
Id
;
Workspace\Solution\SolutionCompilationState.SymbolToProjectId.cs (2)
84
var documentId = this.GetDocumentState(syntaxTree, projectId: null)?.
Id
;
184
return new OriginatingProjectInfo(document.
Id
.ProjectId, Compilation: null, ReferencedThrough: null);
Workspace\Solution\SolutionState.cs (5)
965
var oldDocument = GetRequiredDocumentState(newDocument.
Id
);
968
var oldProject = GetRequiredProjectState(newDocument.
Id
.ProjectId);
1108
var oldProject = GetRequiredProjectState(newDocument.
Id
.ProjectId);
1121
var oldProject = GetRequiredProjectState(newDocument.
Id
.ProjectId);
1132
var oldProject = GetRequiredProjectState(newDocument.
Id
.ProjectId);
Workspace\Solution\TextDocument.cs (1)
39
public DocumentId Id => State.
Id
;
Workspace\Solution\TextDocumentState_Checksum.cs (1)
43
return new DocumentStateChecksums(this.
Id
, infoChecksum, textChecksum);
Workspace\Solution\TextDocumentStates.cs (3)
148
ids.Add(state.
Id
);
152
States.AddRange(states.Select(state => KeyValuePairUtil.Create(state.
Id
, state))),
187
var id = state.
Id
;