35 references to Id
Microsoft.CodeAnalysis.Workspaces (35)
FindSymbols\Shared\AbstractSyntaxIndex.cs (2)
66s_documentIdToIndex.AddOrUpdate(document.Id, index); 92if (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)
588BindSyntaxTreeToId(syntaxTree, Id); 604BindSyntaxTreeToId(treeAndVersion.Tree, this.Id); 616BindSyntaxTreeToId(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)
889Debug.Assert(!documents.Any(d => DocumentStates.Contains(d.Id))); 901Debug.Assert(!documents.Any(d => AdditionalDocumentStates.Contains(d.Id))); 913Debug.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; 327var generatedDocument = this.GetRequiredProject(documentState.Id.ProjectId).TryGetSourceGeneratedDocumentForAlreadyGeneratedId(documentState.Id); 333return GetDocument(documentState.Id)!;
Workspace\Solution\SolutionCompilationState.cs (6)
879var oldDocumentStates = newDocumentStates.SelectAsArray(static (s, oldProjectState) => oldProjectState.DocumentStates.GetRequiredState(s.Id), oldProjectState); 886var oldDocumentStates = newDocumentStates.SelectAsArray(static (s, oldProjectState) => oldProjectState.AdditionalDocumentStates.GetRequiredState(s.Id), oldProjectState); 893var oldDocumentStates = newDocumentStates.SelectAsArray(static (s, oldProjectState) => oldProjectState.AnalyzerConfigDocumentStates.GetRequiredState(s.Id), oldProjectState); 903this.SolutionState.WithDocumentState(documentState), documentState.Id); 1363var documentStatesByProjectId = documentStates.ToDictionary(static state => state.Id.ProjectId); 1629var documentId = newDocumentState.Id;
Workspace\Solution\SolutionCompilationState.SymbolToProjectId.cs (2)
84var documentId = this.GetDocumentState(syntaxTree, projectId: null)?.Id; 184return new OriginatingProjectInfo(document.Id.ProjectId, Compilation: null, ReferencedThrough: null);
Workspace\Solution\SolutionState.cs (5)
965var oldDocument = GetRequiredDocumentState(newDocument.Id); 968var oldProject = GetRequiredProjectState(newDocument.Id.ProjectId); 1108var oldProject = GetRequiredProjectState(newDocument.Id.ProjectId); 1121var oldProject = GetRequiredProjectState(newDocument.Id.ProjectId); 1132var oldProject = GetRequiredProjectState(newDocument.Id.ProjectId);
Workspace\Solution\TextDocument.cs (1)
39public DocumentId Id => State.Id;
Workspace\Solution\TextDocumentState_Checksum.cs (1)
43return new DocumentStateChecksums(this.Id, infoChecksum, textChecksum);
Workspace\Solution\TextDocumentStates.cs (3)
148ids.Add(state.Id); 152States.AddRange(states.Select(state => KeyValuePairUtil.Create(state.Id, state))), 187var id = state.Id;