IBufferGraph.MapUpToFirstMatch Method (SnapshotSpan, SpanTrackingMode, Predicate<ITextSnapshot>)

Maps a span in the current snapshot of some buffer that is a member of the buffer graph up to a sequence of spans in a snapshot of some buffer that is selected by a predicate.

Namespace:  Microsoft.VisualStudio.Text.Projection
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

Syntax

声明
Function MapUpToFirstMatch ( _
    span As SnapshotSpan, _
    trackingMode As SpanTrackingMode, _
    match As Predicate(Of ITextSnapshot) _
) As NormalizedSnapshotSpanCollection
NormalizedSnapshotSpanCollection MapUpToFirstMatch(
    SnapshotSpan span,
    SpanTrackingMode trackingMode,
    Predicate<ITextSnapshot> match
)
NormalizedSnapshotSpanCollection^ MapUpToFirstMatch(
    SnapshotSpan span, 
    SpanTrackingMode trackingMode, 
    Predicate<ITextSnapshot^>^ match
)
abstract MapUpToFirstMatch : 
        span:SnapshotSpan * 
        trackingMode:SpanTrackingMode * 
        match:Predicate<ITextSnapshot> -> NormalizedSnapshotSpanCollection 
function MapUpToFirstMatch(
    span : SnapshotSpan, 
    trackingMode : SpanTrackingMode, 
    match : Predicate<ITextSnapshot>
) : NormalizedSnapshotSpanCollection

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection
A collection of zero or more snapshot spans in the top buffer to which the span maps.

Exceptions

Exception Condition
ArgumentNullException

span.Snapshot or match is nulla null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

trackingMode is not a valid SpanTrackingMode.

Remarks

match is called on each text buffer in the graph until it returns true. After that the predicate is not called again.

.NET Framework Security

See Also

Reference

IBufferGraph Interface

MapUpToFirstMatch Overload

Microsoft.VisualStudio.Text.Projection Namespace