IVsLanguageTextOps::GetPairExtent Method (IVsTextLayer^, TextAddress, array<TextSpan>^)
Determines the location of a matching brace, parenthesis, quotation mark, bracket, or any other item the language service wants to match.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
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::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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). |
