ITextViewLineCollection.GetTextElementSpan 方法

获取一个跨距,其文本元素跨距包含给定缓冲区位置。

命名空间:  Microsoft.VisualStudio.Text.Editor
程序集:  Microsoft.VisualStudio.Text.UI(在 Microsoft.VisualStudio.Text.UI.dll 中)

语法

声明
Function GetTextElementSpan ( _
    bufferPosition As SnapshotPoint _
) As SnapshotSpan
SnapshotSpan GetTextElementSpan(
    SnapshotPoint bufferPosition
)
SnapshotSpan GetTextElementSpan(
    SnapshotPoint bufferPosition
)
abstract GetTextElementSpan : 
        bufferPosition:SnapshotPoint -> SnapshotSpan
function GetTextElementSpan(
    bufferPosition : SnapshotPoint
) : SnapshotSpan

参数

返回值

类型:Microsoft.VisualStudio.Text.SnapshotSpan
与给定文本元素索引相对应的 SnapshotSpan

异常

异常 条件
ArgumentOutOfRangeException

bufferPosition 不对应于此行中的位置。

.NET Framework 安全性

请参阅

参考

ITextViewLineCollection 接口

Microsoft.VisualStudio.Text.Editor 命名空间