IBufferGraph.MapUpToBuffer Method (SnapshotSpan, SpanTrackingMode, ITextBuffer)
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.
Namespace: Microsoft.VisualStudio.Text.Projection
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
声明
Function MapUpToBuffer ( _
span As SnapshotSpan, _
trackingMode As SpanTrackingMode, _
targetBuffer As ITextBuffer _
) As NormalizedSnapshotSpanCollection
NormalizedSnapshotSpanCollection MapUpToBuffer(
SnapshotSpan span,
SpanTrackingMode trackingMode,
ITextBuffer targetBuffer
)
NormalizedSnapshotSpanCollection^ MapUpToBuffer(
SnapshotSpan span,
SpanTrackingMode trackingMode,
ITextBuffer^ targetBuffer
)
abstract MapUpToBuffer :
span:SnapshotSpan *
trackingMode:SpanTrackingMode *
targetBuffer:ITextBuffer -> NormalizedSnapshotSpanCollection
function MapUpToBuffer(
span : SnapshotSpan,
trackingMode : SpanTrackingMode,
targetBuffer : ITextBuffer
) : NormalizedSnapshotSpanCollection
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.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | span.Snapshot 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.