Compartir a través de


VirtualSnapshotSpan Struct

Definition

Represents two VirtualSnapshotPoints

public value class VirtualSnapshotSpan
struct VirtualSnapshotSpan
public struct VirtualSnapshotSpan
type VirtualSnapshotSpan = struct
Public Structure VirtualSnapshotSpan
Inheritance
VirtualSnapshotSpan

Remarks

Virtual spaces are "extra" spaces at the end of a line that do not add to the length of the line. You can enable or disable virtual spaces in Visual Studio. When virtual spaces are disabled, pressing on the right arrow key at the end of a line causes the caret to move to the beginning of the next line. When virtual spaces are enabled, pressing on the right arrow key at the end of a line causes the caret to move forward on the same line.

Constructors

VirtualSnapshotSpan(SnapshotSpan)

Initializes a new instance of a VirtualSnapshotSpan at snapshotSpan, with no virtual spaces.

VirtualSnapshotSpan(VirtualSnapshotPoint, VirtualSnapshotPoint)

Initializes a new instance of a VirtualSnapshotSpan from the given VirtualSnapshotPoints.

Properties

End

Gets the ending virtual point.

IsEmpty

Determines whether the start and end points are in the same place.

IsInVirtualSpace

Determines whether the start or end points are in virtual space.

Length

The length of this span, taking into account virtual space.

Snapshot

The ITextSnapshot to which this snapshot span refers.

SnapshotSpan

Gets the non-virtual SnapshotSpan that this corresponds to.

Start

Gets the starting virtual point.

Methods

Contains(VirtualSnapshotPoint)

Determines whether or not the given virtual point is contained within this virtual span.

Contains(VirtualSnapshotSpan)

Determines whether virtualSpan falls completely within this virtual span.

Equals(Object)

Determines whether two VirtualSnapshotSpan objects are the same.

GetHashCode()

Gets the hash code for the object.

GetText()

The text contained by this virtual snapshot span.

Intersection(VirtualSnapshotSpan)

Returns the intersection with the given virtual span, or null if there is no intersection.

IntersectsWith(VirtualSnapshotSpan)

Determines whether virtualSpan intersects this span. Two spans are considered to intersect if they have positions in common or the end of one span coincides with the start of the other span.

Overlap(VirtualSnapshotSpan)

Returns the overlap with the given virtual span, or null if there is no overlap.

OverlapsWith(VirtualSnapshotSpan)

Determines whether virtualSpan overlaps this span. Two spans are considered to overlap if they have positions in common and neither is empty. Empty spans do not overlap with any other span.

ToString()

Converts the object to a string.

TranslateTo(ITextSnapshot, SpanTrackingMode)

Translates this span to the snapshot with the given tracking mode.

TranslateTo(ITextSnapshot)

Translates this span to the snapshot.

Operators

Equality(VirtualSnapshotSpan, VirtualSnapshotSpan)

Determines whether two VirtualSnapshotSpan objects are the same.

Inequality(VirtualSnapshotSpan, VirtualSnapshotSpan)

Determines whether two VirtualSnapshotSpan objects are different.

Applies to