Condividi tramite


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

'Dichiarazione
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

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

See Also

Reference

IMappingSpan Interface

GetSpans Overload

Microsoft.VisualStudio.Text Namespace