Condividi tramite


IBufferGraph.MapDownToBuffer Method

Definition

Overloads

MapDownToBuffer(SnapshotSpan, SpanTrackingMode, ITextBuffer)

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.

MapDownToBuffer(SnapshotPoint, PointTrackingMode, ITextBuffer, PositionAffinity)

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

MapDownToBuffer(SnapshotSpan, SpanTrackingMode, ITextBuffer)

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

Parameters

span
SnapshotSpan

The span that is to be mapped.

trackingMode
SpanTrackingMode

How span is tracked to the current snapshot if necessary.

targetBuffer
ITextBuffer

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 targetBuffer is null.

trackingMode is not a valid SpanTrackingMode.

Applies to

MapDownToBuffer(SnapshotPoint, PointTrackingMode, ITextBuffer, PositionAffinity)

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

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

targetBuffer
ITextBuffer

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 targetBuffer is null.

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

Applies to