CompilationUnitManager.GetDiagnostics(TextDocumentIdentifier) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Get all current diagnostics.
public Microsoft.VisualStudio.LanguageServer.Protocol.PublishDiagnosticParams[]? GetDiagnostics (Microsoft.VisualStudio.LanguageServer.Protocol.TextDocumentIdentifier? textDocument = default);
member this.GetDiagnostics : Microsoft.VisualStudio.LanguageServer.Protocol.TextDocumentIdentifier -> Microsoft.VisualStudio.LanguageServer.Protocol.PublishDiagnosticParams[]
Public Function GetDiagnostics (Optional textDocument As TextDocumentIdentifier = Nothing) As PublishDiagnosticParams()
Parameters
- textDocument
- TextDocumentIdentifier
Returns
If textDocument is specified, an array with a single item containing all current diagnostics for the given file.
If textDocument is not specified, the diagnostics for all source files are returned.
If textDocument is not listed as a source file, null.
Remarks
This method waits for all currently running or queued tasks to finish before accumulating the diagnostics by calling FlushAndExecute<T>(Func<T>).