IBufferGraph::MapUpToFirstMatch Method (SnapshotSpan, SpanTrackingMode, Predicate<ITextSnapshot^>^)
Visual Studio 2015
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.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
NormalizedSnapshotSpanCollection^ MapUpToFirstMatch( SnapshotSpan span, SpanTrackingMode trackingMode, Predicate<ITextSnapshot^>^ match )
Parameters
- span
-
Type:
Microsoft.VisualStudio.Text::SnapshotSpan
A span in some buffer in the buffer graph.
- trackingMode
-
Type:
Microsoft.VisualStudio.Text::SpanTrackingMode
How span is tracked to the current snapshot if necessary.
- match
-
Type:
System::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 top buffer to which the span maps.
| Exception | Condition |
|---|---|
| ArgumentNullException | span.Snapshot or match is null. |
| ArgumentOutOfRangeException | trackingMode is not a valid SpanTrackingMode. |
match is called on each text buffer in the graph until it returns true. After that the predicate is not called again.
Show: