TrackingRange.Translate(ITextDocumentSnapshot, ITextDocumentSnapshot) 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 this TrackingRange to an older or newer ITextDocumentSnapshot version.
public Microsoft.VisualStudio.RpcContracts.Editor.TrackingRange 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.TrackingRange
Public Function Translate (currentDocumentVersion As ITextDocumentSnapshot, targetDocumentVersion As ITextDocumentSnapshot) As TrackingRange
Parameters
- currentDocumentVersion
- ITextDocumentSnapshot
The document version from which to translate.
- targetDocumentVersion
- ITextDocumentSnapshot
The document version to which to translate.
Returns
A new tracking range.
Exceptions
currentDocumentVersion
or targetDocumentVersion
is null.
targetDocumentVersion
does not refer to the same underlying text document as currentDocumentVersion
.