Share via


IVsLanguageTextOps.GetPairExtent Method

Determines the location of a matching brace, parenthesis, quotation mark, bracket, or any other item the language service wants to match.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Declaration
Function GetPairExtent ( _
    pTextLayer As IVsTextLayer, _
    ta As TextAddress, _
    <OutAttribute> pts As TextSpan() _
) As Integer
int GetPairExtent(
    IVsTextLayer pTextLayer,
    TextAddress ta,
    TextSpan[] pts
)
int GetPairExtent(
    [InAttribute] IVsTextLayer^ pTextLayer, 
    [InAttribute] TextAddress ta, 
    [OutAttribute] array<TextSpan>^ pts
)
abstract GetPairExtent : 
        pTextLayer:IVsTextLayer * 
        ta:TextAddress * 
        pts:TextSpan[] byref -> int
function GetPairExtent(
    pTextLayer : IVsTextLayer, 
    ta : TextAddress, 
    pts : TextSpan[]
) : int

Parameters

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsLanguageTextOps::GetPairExtent(
   [in] IVsTextLayer *pTextLayer, 
   [in] TextAddress ta, 
   [out, retval] TextSpan *pts
);

Pair characters include braces, parentheses, quotes, brackets, and so on.

Note

The pts value is a text span in the corresponding layer that was passed in (that is, in pTextLayer). Do not return this as a text span from the base layer (the text buffer).

.NET Framework Security

See Also

Reference

IVsLanguageTextOps Interface

Microsoft.VisualStudio.TextManager.Interop Namespace