Udostępnij za pośrednictwem


TrackingTextRange.TranslateTo(ITextDocumentSnapshot) Method

Definition

Translates this TrackingTextRange to an older or newer ITextDocumentSnapshot version.

public Microsoft.VisualStudio.Extensibility.Editor.TrackingTextRange TranslateTo(Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot targetDocumentVersion);
member this.TranslateTo : Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot -> Microsoft.VisualStudio.Extensibility.Editor.TrackingTextRange
Public Function TranslateTo (targetDocumentVersion As ITextDocumentSnapshot) As TrackingTextRange

Parameters

targetDocumentVersion
ITextDocumentSnapshot

The document version to which to translate.

Returns

A new tracking range.

Exceptions

targetDocumentVersion is null.

targetDocumentVersion does not refer to the same underlying text document as this TextPosition.

Applies to