26 references to Document
Microsoft.CodeAnalysis.LanguageServer.Protocol (26)
Features\EditAndContinue\EditAndContinueDiagnosticSource_OpenDocument.cs (1)
26
var designTimeDocument =
Document
;
Handler\Diagnostics\DiagnosticSources\AbstractDocumentDiagnosticSource.cs (9)
17
public Solution Solution => this.
Document
.Project.Solution;
24
public ProjectOrDocumentId GetId() => new(
Document
.Id);
25
public Project GetProject() =>
Document
.Project;
28
=> !string.IsNullOrEmpty(
Document
.FilePath)
29
? new VSTextDocumentIdentifier { ProjectContext = ProtocolConversions.ProjectToProjectContext(
Document
.Project), DocumentUri =
Document
.GetURI() }
32
public string ToDisplayString() => $"{this.GetType().Name}: {
Document
.FilePath ??
Document
.Name} in {
Document
.Project.Name}";
Handler\Diagnostics\DiagnosticSources\AbstractWorkspaceDocumentDiagnosticSource.cs (7)
45
if (
Document
is SourceGeneratedDocument sourceGeneratedDocument)
57
return projectDiagnostics.WhereAsArray(d => d.DocumentId ==
Document
.Id);
63
if (!s_projectToDiagnostics.TryGetValue(
Document
.Project, out var lazyDiagnostics))
70
return [.. result[
Document
.Id]];
75
Document
.Project,
81
Document
.Project, documentId: null, diagnosticIds: null, shouldIncludeAnalyzer,
107
return Task.FromResult(codeAnalysisService.GetLastComputedDocumentDiagnostics(
Document
.Id));
Handler\Diagnostics\DiagnosticSources\DocumentDiagnosticSource.cs (2)
32
Document
, range: null, diagnosticKind: this.DiagnosticKind, cancellationToken).ConfigureAwait(false);
40
var copilotDiagnostics = await
Document
.GetCachedCopilotDiagnosticsAsync(span: null, cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\DiagnosticSources\NonLocalDocumentDiagnosticSource.cs (2)
31
Document
.Project,
Document
.Id, diagnosticIds: null, _shouldIncludeAnalyzer,
Handler\Diagnostics\DiagnosticSources\TaskListDiagnosticSource.cs (5)
38
var service = this.
Document
.GetLanguageService<ITaskListService>();
45
var items = await service.GetTaskListItemsAsync(this.
Document
, descriptors, cancellationToken).ConfigureAwait(false);
59
projectId: this.
Document
.Project.Id,
60
language: this.
Document
.Project.Language,
61
location: new DiagnosticDataLocation(i.Span, this.
Document
.Id, mappedFileSpan: i.MappedSpan)));