ITextDocumentSnapshot.TranslatePositionTo 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 TextPosition forward or backward in time to this ITextDocumentSnapshot's version.
public Microsoft.VisualStudio.Extensibility.Editor.TextPosition TranslatePositionTo (Microsoft.VisualStudio.Extensibility.Editor.TextPosition position, Microsoft.VisualStudio.Extensibility.Editor.TextPositionTrackingMode trackingMode);
abstract member TranslatePositionTo : Microsoft.VisualStudio.Extensibility.Editor.TextPosition * Microsoft.VisualStudio.Extensibility.Editor.TextPositionTrackingMode -> Microsoft.VisualStudio.Extensibility.Editor.TextPosition
Public Function TranslatePositionTo (position As TextPosition, trackingMode As TextPositionTrackingMode) As TextPosition
Parameters
- position
- TextPosition
Position to translate
- trackingMode
- TextPositionTrackingMode
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.