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