Partilhar via


IBufferGraph.MapUpToSnapshot Method

Definition

Overloads

MapUpToSnapshot(SnapshotSpan, SpanTrackingMode, ITextSnapshot)

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.

MapUpToSnapshot(SnapshotPoint, PointTrackingMode, PositionAffinity, ITextSnapshot)

Maps a position in the current snapshot of some buffer that is a member of the buffer graph to specified snapshot.

MapUpToSnapshot(SnapshotSpan, SpanTrackingMode, ITextSnapshot)

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.

public:
 Microsoft::VisualStudio::Text::NormalizedSnapshotSpanCollection ^ MapUpToSnapshot(Microsoft::VisualStudio::Text::SnapshotSpan span, Microsoft::VisualStudio::Text::SpanTrackingMode trackingMode, Microsoft::VisualStudio::Text::ITextSnapshot ^ targetSnapshot);
public Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection MapUpToSnapshot (Microsoft.VisualStudio.Text.SnapshotSpan span, Microsoft.VisualStudio.Text.SpanTrackingMode trackingMode, Microsoft.VisualStudio.Text.ITextSnapshot targetSnapshot);
abstract member MapUpToSnapshot : Microsoft.VisualStudio.Text.SnapshotSpan * Microsoft.VisualStudio.Text.SpanTrackingMode * Microsoft.VisualStudio.Text.ITextSnapshot -> Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection
Public Function MapUpToSnapshot (span As SnapshotSpan, trackingMode As SpanTrackingMode, targetSnapshot As ITextSnapshot) As NormalizedSnapshotSpanCollection

Parameters

span
SnapshotSpan

A span in some buffer in the IBufferGraph.

trackingMode
SpanTrackingMode

How span is tracked to the current snapshot if necessary.

targetSnapshot
ITextSnapshot

The snapshot to which to map.

Returns

A collection of zero or more snapshot spans in targetSnapshot to which the span maps using this graph.

Exceptions

span.Snapshot is null.

trackingMode is not a valid SpanTrackingMode.

Applies to

MapUpToSnapshot(SnapshotPoint, PointTrackingMode, PositionAffinity, ITextSnapshot)

Maps a position in the current snapshot of some buffer that is a member of the buffer graph to specified snapshot.

public:
 Nullable<Microsoft::VisualStudio::Text::SnapshotPoint> MapUpToSnapshot(Microsoft::VisualStudio::Text::SnapshotPoint point, Microsoft::VisualStudio::Text::PointTrackingMode trackingMode, Microsoft::VisualStudio::Text::PositionAffinity affinity, Microsoft::VisualStudio::Text::ITextSnapshot ^ targetSnapshot);
public Microsoft.VisualStudio.Text.SnapshotPoint? MapUpToSnapshot (Microsoft.VisualStudio.Text.SnapshotPoint point, Microsoft.VisualStudio.Text.PointTrackingMode trackingMode, Microsoft.VisualStudio.Text.PositionAffinity affinity, Microsoft.VisualStudio.Text.ITextSnapshot targetSnapshot);
abstract member MapUpToSnapshot : Microsoft.VisualStudio.Text.SnapshotPoint * Microsoft.VisualStudio.Text.PointTrackingMode * Microsoft.VisualStudio.Text.PositionAffinity * Microsoft.VisualStudio.Text.ITextSnapshot -> Nullable<Microsoft.VisualStudio.Text.SnapshotPoint>
Public Function MapUpToSnapshot (point As SnapshotPoint, trackingMode As PointTrackingMode, affinity As PositionAffinity, targetSnapshot As ITextSnapshot) As Nullable(Of SnapshotPoint)

Parameters

point
SnapshotPoint

A point in some buffer in the IBufferGraph.

trackingMode
PointTrackingMode

How point is tracked to the current snapshot if necessary.

affinity
PositionAffinity

If the mapping is ambiguous (the position is on a source span seam), determines whether the mapping should target the position immediately after the preceding character or immediately before the following character in the top buffer. This setting has no effect if the mapping is unambiguous.

targetSnapshot
ITextSnapshot

The snapshot to which to map.

Returns

The corresponding position in targetSnapshot, or null if the position does not map to targetSnapshot using this graph.

Exceptions

point.Snapshot is null.

trackingMode is not a valid PointTrackingMode, or affinity is not a valid PositionAffinity.

Applies to