IBufferGraph::MapUpToSnapshot Method (SnapshotSpan, SpanTrackingMode, ITextSnapshot^)
Visual Studio 2015
Maps a span in the current snapshot of a 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^ MapUpToSnapshot( SnapshotSpan span, SpanTrackingMode trackingMode, ITextSnapshot^ targetSnapshot )
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.
- targetSnapshot
-
Type:
Microsoft.VisualStudio.Text::ITextSnapshot^
The snapshot to which to map.
Return Value
Type: Microsoft.VisualStudio.Text::NormalizedSnapshotSpanCollection^A collection of zero or more snapshot spans in targetSnapshot to which the span maps using this graph.
| Exception | Condition |
|---|---|
| ArgumentNullException | span.Snapshot is null. |
| ArgumentOutOfRangeException | trackingMode is not a valid SpanTrackingMode. |
Show: