Partager via


IBufferGraph.MapDownToSnapshot Method

Definition

Overloads

MapDownToSnapshot(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.

MapDownToSnapshot(SnapshotPoint, PointTrackingMode, ITextSnapshot, PositionAffinity)

Maps a position in the graph to the corresponding position in a snapshot lower in the graph. Source buffers are considered to be lower than the projection buffers that consume them.

MapDownToSnapshot(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.

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

Parameters

span
SnapshotSpan

The span that is to be mapped.

trackingMode
SpanTrackingMode

How span is tracked to the current snapshot if necessary.

targetSnapshot
ITextSnapshot

The buffer to which to map the span.

Returns

A collection of zero or more snapshot spans in the target buffer to which the span maps.

Exceptions

span.Snapshot or targetSnapshot is null.

trackingMode is not a valid SpanTrackingMode.

Applies to

MapDownToSnapshot(SnapshotPoint, PointTrackingMode, ITextSnapshot, PositionAffinity)

Maps a position in the graph to the corresponding position in a snapshot lower in the graph. Source buffers are considered to be lower than the projection buffers that consume them.

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

Parameters

position
SnapshotPoint

The position in a buffer in the graph.

trackingMode
PointTrackingMode

How position is tracked to the current snapshot if necessary.

targetSnapshot
ITextSnapshot

The buffer to which to map the position.

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.

Returns

A point in a snapshot of the target buffer, or null if position is not in this graph or does not map to the target buffer with the given affinity.

Exceptions

position.Snapshot or targetSnapshot is null.

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

Applies to