IBufferGraph.MapDownToBuffer Method (SnapshotSpan, SpanTrackingMode, ITextBuffer)
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)
Syntax
'Declaration
Function MapDownToBuffer ( _
span As SnapshotSpan, _
trackingMode As SpanTrackingMode, _
targetBuffer As ITextBuffer _
) As NormalizedSnapshotSpanCollection
NormalizedSnapshotSpanCollection MapDownToBuffer(
SnapshotSpan span,
SpanTrackingMode trackingMode,
ITextBuffer targetBuffer
)
NormalizedSnapshotSpanCollection^ MapDownToBuffer(
SnapshotSpan span,
SpanTrackingMode trackingMode,
ITextBuffer^ targetBuffer
)
abstract MapDownToBuffer :
span:SnapshotSpan *
trackingMode:SpanTrackingMode *
targetBuffer:ITextBuffer -> NormalizedSnapshotSpanCollection
function MapDownToBuffer(
span : SnapshotSpan,
trackingMode : SpanTrackingMode,
targetBuffer : ITextBuffer
) : NormalizedSnapshotSpanCollection
Parameters
span
Type: Microsoft.VisualStudio.Text.SnapshotSpanThe span that is to be mapped.
trackingMode
Type: Microsoft.VisualStudio.Text.SpanTrackingModeHow span is tracked to the current snapshot if necessary.
targetBuffer
Type: Microsoft.VisualStudio.Text.ITextBufferThe 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.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | span.Snapshot or targetBuffer is nulla null reference (Nothing in Visual Basic). |
ArgumentOutOfRangeException | trackingMode is not a valid SpanTrackingMode. |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.