Compartilhar via


ITextDocumentSnapshot.TranslateRangeTo Method

Definition

Translates a TextRange forward or backward in time to this ITextDocumentSnapshot's version.

public Microsoft.VisualStudio.Extensibility.Editor.TextRange TranslateRangeTo (Microsoft.VisualStudio.Extensibility.Editor.TextRange range, Microsoft.VisualStudio.Extensibility.Editor.TextRangeTrackingMode trackingMode);
abstract member TranslateRangeTo : Microsoft.VisualStudio.Extensibility.Editor.TextRange * Microsoft.VisualStudio.Extensibility.Editor.TextRangeTrackingMode -> Microsoft.VisualStudio.Extensibility.Editor.TextRange
Public Function TranslateRangeTo (range As TextRange, trackingMode As TextRangeTrackingMode) As TextRange

Parameters

range
TextRange

range to translate

trackingMode
TextRangeTrackingMode

The TextPositionTrackingMode to use in the translation.

Returns

A TextPosition that has been mapped to the requested document version.

Exceptions

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

Applies to