Compartir a través de


ViewFilter.GetPairExtents Method

Returns the extent of the innermost matching pair of language elements that contains the given location.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)

Syntax

'Declaración
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
)

Parameters

  • line
    Type: System.Int32
    [in] The line number of the location to examine.
  • index
    Type: System.Int32
    [in] The character offset on the line to examine.

Return Value

Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.

Implements

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

Remarks

This method is called to retrieve the span that encompasses the innermost matching pair of language elements (such as "{" and "}" in C# or "<" and ">" in XML) that contains the specified location.

This method is an implementation of the GetPairExtents method on the IVsTextViewFilter interface.

The base method validates the parameters, and then forwards the call to the GetPairExtents method on the Source object that was obtained in the ViewFilter constructor.

.NET Framework Security

See Also

Reference

ViewFilter Class

Microsoft.VisualStudio.Package Namespace