ProjectManager.DocumentHighlights(TextDocumentPositionParams) Method

Definition

Returns an array with all usages of the identifier at the given position (if any) as an array of DocumentHighlight.

public Microsoft.VisualStudio.LanguageServer.Protocol.DocumentHighlight[]? DocumentHighlights (Microsoft.VisualStudio.LanguageServer.Protocol.TextDocumentPositionParams? param);
member this.DocumentHighlights : Microsoft.VisualStudio.LanguageServer.Protocol.TextDocumentPositionParams -> Microsoft.VisualStudio.LanguageServer.Protocol.DocumentHighlight[]
Public Function DocumentHighlights (param As TextDocumentPositionParams) As DocumentHighlight()

Parameters

Returns

DocumentHighlight[]

Remarks

Returns if some parameters are unspecified (null), or if the specified file is not listed as source file, or if the specified position is not a valid position within the currently processed file content, or if no identifier exists at the specified position at this time.

Fails silently without logging anything if an exception occurs upon evaluating the query (occasional failures are to be expected as the evaluation is a readonly query running in parallel to the ongoing processing).

Applies to