IBufferGraph::MapUpToBuffer Method (SnapshotSpan, SpanTrackingMode, ITextBuffer^)
Visual Studio 2015
Maps a span in the current snapshot of some buffer that is a member of the buffer graph to a sequence of spans in a snapshot of a designated buffer.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
NormalizedSnapshotSpanCollection^ MapUpToBuffer( SnapshotSpan span, SpanTrackingMode trackingMode, ITextBuffer^ targetBuffer )
Parameters
- span
-
Type:
Microsoft.VisualStudio.Text::SnapshotSpan
A span in some buffer in the IBufferGraph.
- trackingMode
-
Type:
Microsoft.VisualStudio.Text::SpanTrackingMode
How span is tracked to the current snapshot if necessary.
- targetBuffer
-
Type:
Microsoft.VisualStudio.Text::ITextBuffer^
The buffer to which to map.
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 is null. |
| ArgumentOutOfRangeException | trackingMode is not a valid SpanTrackingMode. |
Show: