ISnapshotDifference.MapToSnapshot Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
MapToSnapshot(Difference, ITextSnapshot) |
Get the extent of the difference in the specified snapshot. |
MapToSnapshot(SnapshotPoint, ITextSnapshot, DifferenceMappingMode) |
Map the specified SnapshotPoint to the specified ITextSnapshot. |
MapToSnapshot(Difference, ITextSnapshot)
Get the extent of the difference in the specified snapshot.
public:
Microsoft::VisualStudio::Text::SnapshotSpan MapToSnapshot(Microsoft::VisualStudio::Text::Differencing::Difference ^ difference, Microsoft::VisualStudio::Text::ITextSnapshot ^ target);
Microsoft::VisualStudio::Text::SnapshotSpan MapToSnapshot(Microsoft::VisualStudio::Text::Differencing::Difference const & difference, Microsoft::VisualStudio::Text::ITextSnapshot const & target);
public Microsoft.VisualStudio.Text.SnapshotSpan MapToSnapshot (Microsoft.VisualStudio.Text.Differencing.Difference difference, Microsoft.VisualStudio.Text.ITextSnapshot target);
abstract member MapToSnapshot : Microsoft.VisualStudio.Text.Differencing.Difference * Microsoft.VisualStudio.Text.ITextSnapshot -> Microsoft.VisualStudio.Text.SnapshotSpan
Public Function MapToSnapshot (difference As Difference, target As ITextSnapshot) As SnapshotSpan
Parameters
- difference
- Difference
- target
- ITextSnapshot
Returns
Applies to
MapToSnapshot(SnapshotPoint, ITextSnapshot, DifferenceMappingMode)
Map the specified SnapshotPoint to the specified ITextSnapshot.
public Microsoft.VisualStudio.Text.SnapshotPoint MapToSnapshot (Microsoft.VisualStudio.Text.SnapshotPoint point, Microsoft.VisualStudio.Text.ITextSnapshot target, Microsoft.VisualStudio.Text.Differencing.DifferenceMappingMode mode = Microsoft.VisualStudio.Text.Differencing.DifferenceMappingMode.LineColumn);
abstract member MapToSnapshot : Microsoft.VisualStudio.Text.SnapshotPoint * Microsoft.VisualStudio.Text.ITextSnapshot * Microsoft.VisualStudio.Text.Differencing.DifferenceMappingMode -> Microsoft.VisualStudio.Text.SnapshotPoint
Public Function MapToSnapshot (point As SnapshotPoint, target As ITextSnapshot, Optional mode As DifferenceMappingMode = Microsoft.VisualStudio.Text.Differencing.DifferenceMappingMode.LineColumn) As SnapshotPoint
Parameters
- point
- SnapshotPoint
Point to map.
- target
- ITextSnapshot
Target snapshot
The mapping used when mapping between the left and right snapshots (or vs. versa) when point
lies inside a difference.
Returns
The snapshot point.
Remarks
Mapping to the left or right buffers may be lossy. Points inside a difference will be mapped according to mode
.
Mapping between the inline snapshot and the source snapshots or vs. versa will, with one exception, be invertable. The exception is that a point between the \r\n of a line break may be mapped to the end of the corresponding line.