Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Translates this span to the specified snapshot with the given tracking mode.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)
Syntax
'Declaration
Public Function TranslateTo ( _
snapshot As ITextSnapshot, _
trackingMode As SpanTrackingMode _
) As VirtualSnapshotSpan
public VirtualSnapshotSpan TranslateTo(
ITextSnapshot snapshot,
SpanTrackingMode trackingMode
)
public:
VirtualSnapshotSpan TranslateTo(
ITextSnapshot^ snapshot,
SpanTrackingMode trackingMode
)
member TranslateTo :
snapshot:ITextSnapshot *
trackingMode:SpanTrackingMode -> VirtualSnapshotSpan
public function TranslateTo(
snapshot : ITextSnapshot,
trackingMode : SpanTrackingMode
) : VirtualSnapshotSpan
Parameters
- snapshot
Type: Microsoft.VisualStudio.Text.ITextSnapshot
The target snapshot.
- trackingMode
Type: Microsoft.VisualStudio.Text.SpanTrackingMode
The tracking mode.
Return Value
Type: Microsoft.VisualStudio.Text.VirtualSnapshotSpan
The corresponding VirtualSnapshotSpan in snapshot.
Exceptions
Exception | Condition |
---|---|
ArgumentException | snapshot is for an earlier snapshot. |
Remarks
See TranslateTo for a description of how VirtualSnapshotPoint translation behaves.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.