将此点转换为指定的文本快照在指定的跟踪模式。
命名空间: Microsoft.VisualStudio.Text
程序集: Microsoft.VisualStudio.Text.Logic(在 Microsoft.VisualStudio.Text.Logic.dll 中)
语法
声明
Public Function TranslateTo ( _
snapshot As ITextSnapshot, _
trackingMode As PointTrackingMode _
) As VirtualSnapshotPoint
public VirtualSnapshotPoint TranslateTo(
ITextSnapshot snapshot,
PointTrackingMode trackingMode
)
public:
VirtualSnapshotPoint TranslateTo(
ITextSnapshot^ snapshot,
PointTrackingMode trackingMode
)
member TranslateTo :
snapshot:ITextSnapshot *
trackingMode:PointTrackingMode -> VirtualSnapshotPoint
public function TranslateTo(
snapshot : ITextSnapshot,
trackingMode : PointTrackingMode
) : VirtualSnapshotPoint
参数
snapshot
类型:Microsoft.VisualStudio.Text.ITextSnapshot目标快照。
trackingMode
类型:Microsoft.VisualStudio.Text.PointTrackingMode要使用的跟踪模式。
返回值
类型:Microsoft.VisualStudio.Text.VirtualSnapshotPoint
snapshot 中对应的 VirtualSnapshotPoint。
异常
异常 | 条件 |
---|---|
ArgumentException | snapshot 为早期快照。 |
备注
" 跟踪模式是相对虚拟点,而不是快照点。 如果该点位于虚空格,它将正常运行,就象基础 (非虚拟) 点始终跟踪,就象,因为所有文本插入到点 (在行尾它打开) 在”虚拟之前要插入 “点。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。