다음을 통해 공유


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

Maps a snapshot span in some buffer in the graph to a sequence of zero or more spans in some source snapshot selected by a predicate.

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

Syntax

'Declaration
Function MapDownToFirstMatch ( _
    span As SnapshotSpan, _
    trackingMode As SpanTrackingMode, _
    match As Predicate(Of ITextSnapshot) _
) As NormalizedSnapshotSpanCollection
NormalizedSnapshotSpanCollection MapDownToFirstMatch(
    SnapshotSpan span,
    SpanTrackingMode trackingMode,
    Predicate<ITextSnapshot> match
)
NormalizedSnapshotSpanCollection^ MapDownToFirstMatch(
    SnapshotSpan span, 
    SpanTrackingMode trackingMode, 
    Predicate<ITextSnapshot^>^ match
)
abstract MapDownToFirstMatch : 
        span:SnapshotSpan * 
        trackingMode:SpanTrackingMode * 
        match:Predicate<ITextSnapshot> -> NormalizedSnapshotSpanCollection
function MapDownToFirstMatch(
    span : SnapshotSpan, 
    trackingMode : SpanTrackingMode, 
    match : Predicate<ITextSnapshot>
) : NormalizedSnapshotSpanCollection

Parameters

  • match
    Type: Predicate<ITextSnapshot>

    The predicate that identifies the target buffer.

Return Value

Type: Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection
A collection of zero or more snapshot spans in the target buffer to which the topSpan 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 buffer graph until it returns true. The predicate will not be called again.

.NET Framework Security

See Also

Reference

IBufferGraph Interface

MapDownToFirstMatch Overload

Microsoft.VisualStudio.Text.Projection Namespace