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
'宣告
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
- pTextLayer
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer
[in] An IVsTextLayer object representing the text file.
- ta
Type: Microsoft.VisualStudio.TextManager.Interop.TextAddress
[in] Specifies the text address of the first item in the pair. The text address is relative to the location of text within the text layer. For more information, see TextAddress.
- pts
Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
[out] Returns the span of text containing the second item in the pair. For more information, see TextSpan.
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.
注意
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.