IBufferGraph.MapDownToSnapshot Method (SnapshotSpan, SpanTrackingMode, ITextSnapshot)

Maps a snapshot span in some buffer in the graph to a sequence of zero or more spans in a buffer that is lower in the graph. Source buffers are considered to be lower than the projection buffers that consume them.

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

NormalizedSnapshotSpanCollection MapDownToSnapshot(
	SnapshotSpan span,
	SpanTrackingMode trackingMode,
	ITextSnapshot targetSnapshot
)

Parameters

span
Type: Microsoft.VisualStudio.Text.SnapshotSpan

The span that is to be mapped.

trackingMode
Type: Microsoft.VisualStudio.Text.SpanTrackingMode

How span is tracked to the current snapshot if necessary.

targetSnapshot
Type: Microsoft.VisualStudio.Text.ITextSnapshot

The buffer to which to map the span.

Return Value

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

ExceptionCondition
ArgumentNullException

span.Snapshot or targetSnapshot is null.

ArgumentOutOfRangeException

trackingMode is not a valid SpanTrackingMode.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft