Partilhar via


VirtualSnapshotSpan.TranslateTo Method

Definition

Overloads

TranslateTo(ITextSnapshot)

Translates this span to the snapshot.

TranslateTo(ITextSnapshot, SpanTrackingMode)

Translates this span to the snapshot with the given tracking mode.

TranslateTo(ITextSnapshot)

Translates this span to the snapshot.

public:
 Microsoft::VisualStudio::Text::VirtualSnapshotSpan TranslateTo(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot);
Microsoft::VisualStudio::Text::VirtualSnapshotSpan TranslateTo(Microsoft::VisualStudio::Text::ITextSnapshot const & snapshot);
public Microsoft.VisualStudio.Text.VirtualSnapshotSpan TranslateTo (Microsoft.VisualStudio.Text.ITextSnapshot snapshot);
member this.TranslateTo : Microsoft.VisualStudio.Text.ITextSnapshot -> Microsoft.VisualStudio.Text.VirtualSnapshotSpan
Public Function TranslateTo (snapshot As ITextSnapshot) As VirtualSnapshotSpan

Parameters

snapshot
ITextSnapshot

The target snapshot.

Returns

The corresponding VirtualSnapshotSpan in snapshot.

Exceptions

snapshot is for an earlier snapshot.

Applies to

TranslateTo(ITextSnapshot, SpanTrackingMode)

Translates this span to the snapshot with the given tracking mode.

public:
 Microsoft::VisualStudio::Text::VirtualSnapshotSpan TranslateTo(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot, Microsoft::VisualStudio::Text::SpanTrackingMode trackingMode);
Microsoft::VisualStudio::Text::VirtualSnapshotSpan TranslateTo(Microsoft::VisualStudio::Text::ITextSnapshot const & snapshot, Microsoft::VisualStudio::Text::SpanTrackingMode trackingMode);
public Microsoft.VisualStudio.Text.VirtualSnapshotSpan TranslateTo (Microsoft.VisualStudio.Text.ITextSnapshot snapshot, Microsoft.VisualStudio.Text.SpanTrackingMode trackingMode);
member this.TranslateTo : Microsoft.VisualStudio.Text.ITextSnapshot * Microsoft.VisualStudio.Text.SpanTrackingMode -> Microsoft.VisualStudio.Text.VirtualSnapshotSpan
Public Function TranslateTo (snapshot As ITextSnapshot, trackingMode As SpanTrackingMode) As VirtualSnapshotSpan

Parameters

snapshot
ITextSnapshot

The target snapshot.

trackingMode
SpanTrackingMode

The span tracking mode.

Returns

The corresponding VirtualSnapshotSpan in snapshot.

Exceptions

snapshot is for an earlier snapshot.

Remarks

See TranslateTo(ITextSnapshot, PointTrackingMode) for a description of how VirtualSnapshotPoint translation behaves.

Applies to