Freigeben über


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
Public method VirtualSnapshotSpan(SnapshotSpan) Initializes a new instance of a VirtualSnapshotSpan in the specified snapshot span, with no virtual spaces.
Public method VirtualSnapshotSpan(VirtualSnapshotPoint, VirtualSnapshotPoint) Initializes a new instance of a VirtualSnapshotSpan from the specified start and end points.

Top

Properties

  Name Description
Public property End Gets the ending virtual point.
Public property IsEmpty Determines whether the start and end points are in the same place.
Public property IsInVirtualSpace Determines whether the start or end points are in virtual space.
Public property Length The length of this span, taking into account virtual space.
Public property Snapshot The ITextSnapshot to which this snapshot span refers.
Public property SnapshotSpan Gets the non-virtual snapshot span to which this span corresponds.
Public property Start Gets the starting virtual point.

Top

Methods

  Name Description
Public method Contains(VirtualSnapshotPoint) Determines whether or not the given virtual point is contained within this virtual span.
Public method Contains(VirtualSnapshotSpan) Determines whether the specified virtual span falls completely within this virtual span.
Public method Equals Determines whether two VirtualSnapshotSpan objects are the same. (Overrides ValueType.Equals(Object).)
Public method GetHashCode Gets the hash code for the object. (Overrides ValueType.GetHashCode.)
Public method GetText The text contained by this virtual snapshot span.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Intersection Returns the intersection with the given virtual span.
Public method IntersectsWith Determines whether the specified virtual span intersects this span.
Public method Overlap Returns the overlap with the specified virtual span.
Public method OverlapsWith Determines whether the specified span overlaps this span.
Public method ToString Converts the object to a string. (Overrides ValueType.ToString.)
Public method TranslateTo(ITextSnapshot) Translates this span to the specified snapshot.
Public method TranslateTo(ITextSnapshot, SpanTrackingMode) Translates this span to the specified snapshot with the given tracking mode.

Top

Operators

  Name Description
Public operatorStatic member Equality Determines whether two VirtualSnapshotSpan objects are the same.
Public operatorStatic member 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.

See Also

Reference

Microsoft.VisualStudio.Text Namespace