VirtualSnapshotSpan Structure
Represents the range between two VirtualSnapshotPoint objects.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)
Syntax
'Declaration
Public Structure VirtualSnapshotSpan
public struct VirtualSnapshotSpan
public value class VirtualSnapshotSpan
[<Sealed>]
type VirtualSnapshotSpan = struct end
JScript supports the use of structures, but not the declaration of new ones.
The VirtualSnapshotSpan type exposes the following members.
Constructors
Name | Description | |
---|---|---|
VirtualSnapshotSpan(SnapshotSpan) | Initializes a new instance of a VirtualSnapshotSpan in the specified snapshot span, with no virtual spaces. | |
VirtualSnapshotSpan(VirtualSnapshotPoint, VirtualSnapshotPoint) | Initializes a new instance of a VirtualSnapshotSpan from the specified start and end points. |
Top
Properties
Name | Description | |
---|---|---|
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 snapshot span to which this span corresponds. | |
Start | Gets the starting virtual point. |
Top
Methods
Name | Description | |
---|---|---|
Contains(VirtualSnapshotPoint) | Determines whether or not the given virtual point is contained within this virtual span. | |
Contains(VirtualSnapshotSpan) | Determines whether the specified virtual span falls completely within this virtual span. | |
Equals | Determines whether two VirtualSnapshotSpan objects are the same. (Overrides ValueType.Equals(Object).) | |
GetHashCode | Gets the hash code for the object. (Overrides ValueType.GetHashCode.) | |
GetText | The text contained by this virtual snapshot span. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Intersection | Returns the intersection with the given virtual span. | |
IntersectsWith | Determines whether the specified virtual span intersects this span. | |
Overlap | Returns the overlap with the specified virtual span. | |
OverlapsWith | Determines whether the specified span overlaps this span. | |
ToString | Converts the object to a string. (Overrides ValueType.ToString.) | |
TranslateTo(ITextSnapshot) | Translates this span to the specified snapshot. | |
TranslateTo(ITextSnapshot, SpanTrackingMode) | Translates this span to the specified snapshot with the given tracking mode. |
Top
Operators
Name | Description | |
---|---|---|
Equality | Determines whether two VirtualSnapshotSpan objects are the same. | |
Inequality | Determines whether two VirtualSnapshotSpan objects are different. |
Top
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.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.