DiagnosticTools.WithLineNumOffset(Diagnostic, Int32) Method

Definition

Returns a copy of diagnostic with offset added to the line numbers.

public static Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic WithLineNumOffset (this Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic diagnostic, int offset);
static member WithLineNumOffset : Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic * int -> Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic
<Extension()>
Public Function WithLineNumOffset (diagnostic As Diagnostic, offset As Integer) As Diagnostic

Parameters

diagnostic
Diagnostic
offset
Int32

Returns

Diagnostic

Exceptions

The new diagnostic would have negative line numbers.

Applies to