Partilhar via


IBufferGraph.MapUpToBuffer Method

Definition

Overloads

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

MapUpToBuffer(SnapshotPoint, PointTrackingMode, PositionAffinity, ITextBuffer)

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

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

public:
 Microsoft::VisualStudio::Text::NormalizedSnapshotSpanCollection ^ MapUpToBuffer(Microsoft::VisualStudio::Text::SnapshotSpan span, Microsoft::VisualStudio::Text::SpanTrackingMode trackingMode, Microsoft::VisualStudio::Text::ITextBuffer ^ targetBuffer);
public Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection MapUpToBuffer (Microsoft.VisualStudio.Text.SnapshotSpan span, Microsoft.VisualStudio.Text.SpanTrackingMode trackingMode, Microsoft.VisualStudio.Text.ITextBuffer targetBuffer);
abstract member MapUpToBuffer : Microsoft.VisualStudio.Text.SnapshotSpan * Microsoft.VisualStudio.Text.SpanTrackingMode * Microsoft.VisualStudio.Text.ITextBuffer -> Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection
Public Function MapUpToBuffer (span As SnapshotSpan, trackingMode As SpanTrackingMode, targetBuffer As ITextBuffer) 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.

targetBuffer
ITextBuffer

The buffer to which to map.

Returns

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

Exceptions

span.Snapshot is null.

trackingMode is not a valid SpanTrackingMode.

Applies to

MapUpToBuffer(SnapshotPoint, PointTrackingMode, PositionAffinity, ITextBuffer)

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

public:
 Nullable<Microsoft::VisualStudio::Text::SnapshotPoint> MapUpToBuffer(Microsoft::VisualStudio::Text::SnapshotPoint point, Microsoft::VisualStudio::Text::PointTrackingMode trackingMode, Microsoft::VisualStudio::Text::PositionAffinity affinity, Microsoft::VisualStudio::Text::ITextBuffer ^ targetBuffer);
public Microsoft.VisualStudio.Text.SnapshotPoint? MapUpToBuffer (Microsoft.VisualStudio.Text.SnapshotPoint point, Microsoft.VisualStudio.Text.PointTrackingMode trackingMode, Microsoft.VisualStudio.Text.PositionAffinity affinity, Microsoft.VisualStudio.Text.ITextBuffer targetBuffer);
abstract member MapUpToBuffer : Microsoft.VisualStudio.Text.SnapshotPoint * Microsoft.VisualStudio.Text.PointTrackingMode * Microsoft.VisualStudio.Text.PositionAffinity * Microsoft.VisualStudio.Text.ITextBuffer -> Nullable<Microsoft.VisualStudio.Text.SnapshotPoint>
Public Function MapUpToBuffer (point As SnapshotPoint, trackingMode As PointTrackingMode, affinity As PositionAffinity, targetBuffer As ITextBuffer) 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.

targetBuffer
ITextBuffer

The buffer to which to map.

Returns

The corresponding position in a snapshot of the target buffer, or null if the position does not map to the target buffer using this graph.

Exceptions

point.Snapshot is null.

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

Applies to