Source::GetPairExtents Method (IVsTextView^, Int32, Int32, TextSpan, TextSpan)

 

Gets the text spans for a matching pair (or triplet) of language elements.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

public:
virtual bool GetPairExtents(
	IVsTextView^ textView,
	int line,
	int col,
	[OutAttribute] TextSpan% startBraceSpan,
	[OutAttribute] TextSpan% endBraceSpan
)

Parameters

textView
Type: Microsoft.VisualStudio.TextManager.Interop::IVsTextView^

The IVsTextView that contains the text that contains the matching language elements.

line
Type: System::Int32

The line number.

col
Type: System::Int32

The column number.

startBraceSpan
Type: Microsoft.VisualStudio.TextManager.Interop::TextSpan

[out] The T:Microsoft.VisualStudio.TextManager.Interop.IVsTextSpan that contains the starting element.

endBraceSpan
Type: Microsoft.VisualStudio.TextManager.Interop::TextSpan

[out] The T:Microsoft.VisualStudio.TextManager.Interop.IVsTextSpan that contains the end element.

Return Value

Type: System::Boolean

true if the pair was found, otherwise false.

This method performs a BeginParse operation with MatchBraces and a M:Microsoft.VisualStudio.Package.ParseResultHandler of M:Microsoft.VisualStudio.Package.Source.HandleGetPairExtentResponse and returns the starting and ending T:Microsoft.VisualStudio.TextManager.Interop.IVsTextSpan objects.

Return to top
Show: