IMappingSpan.GetSpans Method (Predicate<ITextBuffer>)
Maps the span to a matching ITextBuffer.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Декларация
Function GetSpans ( _
match As Predicate(Of ITextBuffer) _
) As NormalizedSnapshotSpanCollection
NormalizedSnapshotSpanCollection GetSpans(
Predicate<ITextBuffer> match
)
NormalizedSnapshotSpanCollection^ GetSpans(
Predicate<ITextBuffer^>^ match
)
abstract GetSpans :
match:Predicate<ITextBuffer> -> NormalizedSnapshotSpanCollection
function GetSpans(
match : Predicate<ITextBuffer>
) : NormalizedSnapshotSpanCollection
Parameters
- match
Type: System.Predicate<ITextBuffer>
The predicate used to identify the ITextBuffer.
Return Value
Type: Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection
A possibly empty collection of spans in the matching buffer.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | match is nulla null reference (Nothing in Visual Basic). |
Remarks
match is called on each text buffer in the buffer graph until it returns true. The predicate will not be called again.
.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.