IVsLanguageTextOps.GetPairExtent Method

Definition

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

public:
 int GetPairExtent(Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer ^ pTextLayer, Microsoft::VisualStudio::TextManager::Interop::TextAddress ta, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pts);
public:
 int GetPairExtent(Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer ^ pTextLayer, Microsoft::VisualStudio::TextManager::Interop::TextAddress ta, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pts);
int GetPairExtent(Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer const & pTextLayer, Microsoft::VisualStudio::TextManager::Interop::TextAddress ta, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & pts);
public int GetPairExtent (Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer pTextLayer, Microsoft.VisualStudio.TextManager.Interop.TextAddress ta, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] pts);
abstract member GetPairExtent : Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer * Microsoft.VisualStudio.TextManager.Interop.TextAddress * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function GetPairExtent (pTextLayer As IVsTextLayer, ta As TextAddress, pts As TextSpan()) As Integer

Parameters

pTextLayer
IVsTextLayer

[in] An IVsTextLayer object representing the text file.

ta
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
TextSpan[]

[out] Returns the span of text containing the second item in the pair. For more information, see TextSpan.

Returns

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).

Applies to