ViewFilter.GetPairExtents 方法

返回包含特定位置最内层的区域相对语言元素。

命名空间:  Microsoft.VisualStudio.Package
程序集:   Microsoft.VisualStudio.Package.LanguageService(在 Microsoft.VisualStudio.Package.LanguageService.dll 中)
  Microsoft.VisualStudio.Package.LanguageService.10.0(在 Microsoft.VisualStudio.Package.LanguageService.10.0.dll 中)
  Microsoft.VisualStudio.Package.LanguageService.9.0(在 Microsoft.VisualStudio.Package.LanguageService.9.0.dll 中)
  Microsoft.VisualStudio.Package.LanguageService.11.0(在 Microsoft.VisualStudio.Package.LanguageService.11.0.dll 中)

语法

声明
Public Overridable Function GetPairExtents ( _
    line As Integer, _
    index As Integer, _
    span As TextSpan() _
) As Integer
public virtual int GetPairExtents(
    int line,
    int index,
    TextSpan[] span
)

参数

  • line
    类型:System.Int32
    [in] 要检查的位置的行号。
  • index
    类型:System.Int32
    [in] 在检查行的字符偏移量。

返回值

类型:System.Int32
如果成功,则返回; S_OK否则,返回错误代码。

实现

IVsTextViewFilter.GetPairExtents(Int32, Int32, array<TextSpan[])

备注

此方法调用检索包含指定的位置处的最内层相对语言元素的范围 (例如 “{”和 “}”在 C# 或 “AMP_LT”和 “AMP_GT”在 XML)

此方法是 GetPairExtents 方法的实现。 IVsTextViewFilter 接口的。

该基方法向前验证参数然后调用在 ViewFilter 构造函数获取的 Source 对象的 GetPairExtents 方法。

.NET Framework 安全性

请参见

参考

ViewFilter 类

Microsoft.VisualStudio.Package 命名空间