IBufferGraph.MapUpToSnapshot Method (SnapshotSpan, SpanTrackingMode, ITextSnapshot)
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.
Namespace: Microsoft.VisualStudio.Text.Projection
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'宣告
Function MapUpToSnapshot ( _
span As SnapshotSpan, _
trackingMode As SpanTrackingMode, _
targetSnapshot As ITextSnapshot _
) As NormalizedSnapshotSpanCollection
NormalizedSnapshotSpanCollection MapUpToSnapshot(
SnapshotSpan span,
SpanTrackingMode trackingMode,
ITextSnapshot targetSnapshot
)
NormalizedSnapshotSpanCollection^ MapUpToSnapshot(
SnapshotSpan span,
SpanTrackingMode trackingMode,
ITextSnapshot^ targetSnapshot
)
abstract MapUpToSnapshot :
span:SnapshotSpan *
trackingMode:SpanTrackingMode *
targetSnapshot:ITextSnapshot -> NormalizedSnapshotSpanCollection
function MapUpToSnapshot(
span : SnapshotSpan,
trackingMode : SpanTrackingMode,
targetSnapshot : ITextSnapshot
) : 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.
- 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.
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.