ITextDocumentSnapshot.TranslateRangeTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.