26 references to Document
Microsoft.CodeAnalysis.LanguageServer.Protocol (26)
Features\EditAndContinue\EditAndContinueDiagnosticSource_OpenDocument.cs (1)
23var designTimeDocument = Document;
Handler\Diagnostics\DiagnosticSources\AbstractDocumentDiagnosticSource.cs (9)
17public Solution Solution => this.Document.Project.Solution; 22public ProjectOrDocumentId GetId() => new(Document.Id); 23public Project GetProject() => Document.Project; 26=> !string.IsNullOrEmpty(Document.FilePath) 27? new VSTextDocumentIdentifier { ProjectContext = ProtocolConversions.ProjectToProjectContext(Document.Project), DocumentUri = Document.GetURI() } 30public string ToDisplayString() => $"{this.GetType().Name}: {Document.FilePath ?? Document.Name} in {Document.Project.Name}";
Handler\Diagnostics\DiagnosticSources\AbstractWorkspaceDocumentDiagnosticSource.cs (7)
39if (Document is SourceGeneratedDocument sourceGeneratedDocument) 51return projectDiagnostics.WhereAsArray(d => d.DocumentId == Document.Id); 57if (!s_projectToDiagnostics.TryGetValue(Document.Project, out var lazyDiagnostics)) 64return [.. result[Document.Id]]; 69Document.Project, 75Document.Project, documentId: null, diagnosticIds: null, shouldIncludeAnalyzer, 93var diagnostics = codeAnalysisService.GetLastComputedDocumentDiagnostics(Document.Id);
Handler\Diagnostics\DiagnosticSources\DocumentDiagnosticSource.cs (2)
26Document, range: null, diagnosticKind: this.DiagnosticKind, cancellationToken).ConfigureAwait(false); 34var copilotDiagnostics = await Document.GetCachedCopilotDiagnosticsAsync(span: null, cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\DiagnosticSources\NonLocalDocumentDiagnosticSource.cs (2)
28Document.Project, Document.Id, diagnosticIds: null, _shouldIncludeAnalyzer,
Handler\Diagnostics\DiagnosticSources\TaskListDiagnosticSource.cs (5)
35var service = this.Document.GetLanguageService<ITaskListService>(); 42var items = await service.GetTaskListItemsAsync(this.Document, descriptors, cancellationToken).ConfigureAwait(false); 56projectId: this.Document.Project.Id, 57language: this.Document.Project.Language, 58location: new DiagnosticDataLocation(i.Span, this.Document.Id, mappedFileSpan: i.MappedSpan)));