Dela via


TaggedTrackingRange<T>.Translate Method

Definition

Translates this TaggedTrackingRange<T> to an older or newer ITextDocumentSnapshot version.

public Microsoft.VisualStudio.RpcContracts.Editor.TaggedTrackingRange<T> Translate (Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot currentDocumentVersion, Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot targetDocumentVersion);
member this.Translate : Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot * Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot -> Microsoft.VisualStudio.RpcContracts.Editor.TaggedTrackingRange<'T (requires 'T :> Microsoft.VisualStudio.RpcContracts.Editor.ITagContract and 'T :> IEquatable<'T>)>
Public Function Translate (currentDocumentVersion As ITextDocumentSnapshot, targetDocumentVersion As ITextDocumentSnapshot) As TaggedTrackingRange(Of T)

Parameters

currentDocumentVersion
ITextDocumentSnapshot

The document version from which to translate.

targetDocumentVersion
ITextDocumentSnapshot

The document version to which to translate.

Returns

A new tagged tracking range.

Exceptions

currentDocumentVersion or targetDocumentVersion is null.

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

Applies to