SnapshotSpan SnapshotSpan SnapshotSpan SnapshotSpan SnapshotSpan Struct

Definition

An immutable text span in a particular text snapshot.

public value class SnapshotSpan
struct SnapshotSpan
public struct SnapshotSpan
type SnapshotSpan = struct
Public Structure SnapshotSpan
Inheritance
SnapshotSpanSnapshotSpanSnapshotSpanSnapshotSpanSnapshotSpan

Constructors

SnapshotSpan(ITextSnapshot, Span) SnapshotSpan(ITextSnapshot, Span) SnapshotSpan(ITextSnapshot, Span) SnapshotSpan(ITextSnapshot, Span) SnapshotSpan(ITextSnapshot, Span)

Initializes a new instance of a SnapshotSpan with the specified snapshot and span.

SnapshotSpan(SnapshotPoint, SnapshotPoint) SnapshotSpan(SnapshotPoint, SnapshotPoint) SnapshotSpan(SnapshotPoint, SnapshotPoint) SnapshotSpan(SnapshotPoint, SnapshotPoint) SnapshotSpan(SnapshotPoint, SnapshotPoint)

Initializes a new instance of a SnapshotSpan from two SnapshotPoint objects.

SnapshotSpan(SnapshotPoint, Int32) SnapshotSpan(SnapshotPoint, Int32) SnapshotSpan(SnapshotPoint, Int32) SnapshotSpan(SnapshotPoint, Int32) SnapshotSpan(SnapshotPoint, Int32)

Initializes a new instance of a SnapshotSpan from an existing SnapshotPoint and a specified length.

SnapshotSpan(ITextSnapshot, Int32, Int32) SnapshotSpan(ITextSnapshot, Int32, Int32) SnapshotSpan(ITextSnapshot, Int32, Int32) SnapshotSpan(ITextSnapshot, Int32, Int32) SnapshotSpan(ITextSnapshot, Int32, Int32)

Initializes a new instance of a SnapshotSpan with the specified snapshot, start point, and length.

Properties

End End End End End

Gets the end of the snapshot span.

IsEmpty IsEmpty IsEmpty IsEmpty IsEmpty

Determines whether or not this span is empty.

Length Length Length Length Length

Gets the length of the span, which is always non-negative.

Snapshot Snapshot Snapshot Snapshot Snapshot

The ITextSnapshot to which this snapshot span refers.

Span Span Span Span Span

Gets the span covered by the snapshot span.

Start Start Start Start Start

Gets the starting index of the snapshot span.

Methods

Contains(SnapshotPoint) Contains(SnapshotPoint) Contains(SnapshotPoint) Contains(SnapshotPoint) Contains(SnapshotPoint)

Determines whether the specified SnapshotPoint lies within the span.

Contains(SnapshotSpan) Contains(SnapshotSpan) Contains(SnapshotSpan) Contains(SnapshotSpan) Contains(SnapshotSpan)

Determines whether the snapshot span falls completely within this span.

Contains(Span) Contains(Span) Contains(Span) Contains(Span) Contains(Span)

Determines whether the specified span falls completely within this span.

Contains(Int32) Contains(Int32) Contains(Int32) Contains(Int32) Contains(Int32)

Determines whether the position lies within the span.

Equals(Object) Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether two snapshot spans are the same.

GetHashCode() GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as a hash function for this type.

GetText() GetText() GetText() GetText() GetText()

The text contained by this snapshot span.

Intersection(SnapshotSpan) Intersection(SnapshotSpan) Intersection(SnapshotSpan) Intersection(SnapshotSpan) Intersection(SnapshotSpan)

Calculates the intersection with the given SnapshotSpan.

Intersection(Span) Intersection(Span) Intersection(Span) Intersection(Span) Intersection(Span)

Calculates the intersection with the given span.

IntersectsWith(Span) IntersectsWith(Span) IntersectsWith(Span) IntersectsWith(Span) IntersectsWith(Span)

Determines whether the specified span intersects this span.

IntersectsWith(SnapshotSpan) IntersectsWith(SnapshotSpan) IntersectsWith(SnapshotSpan) IntersectsWith(SnapshotSpan) IntersectsWith(SnapshotSpan)

Determines whether the specified snapshot span intersects this span.

Overlap(SnapshotSpan) Overlap(SnapshotSpan) Overlap(SnapshotSpan) Overlap(SnapshotSpan) Overlap(SnapshotSpan)

Gets the overlap with the given SnapshotSpan.

Overlap(Span) Overlap(Span) Overlap(Span) Overlap(Span) Overlap(Span)

Getss the overlap with the given span.

OverlapsWith(SnapshotSpan) OverlapsWith(SnapshotSpan) OverlapsWith(SnapshotSpan) OverlapsWith(SnapshotSpan) OverlapsWith(SnapshotSpan)

Determines whether another span overlaps this span.

OverlapsWith(Span) OverlapsWith(Span) OverlapsWith(Span) OverlapsWith(Span) OverlapsWith(Span)

Determines whether simpleSpan overlaps this span.

ToString() ToString() ToString() ToString() ToString()

Converts this snapshot span to a string.

TranslateTo(ITextSnapshot, SpanTrackingMode) TranslateTo(ITextSnapshot, SpanTrackingMode) TranslateTo(ITextSnapshot, SpanTrackingMode) TranslateTo(ITextSnapshot, SpanTrackingMode) TranslateTo(ITextSnapshot, SpanTrackingMode)

Translates this snapshot span to a different snapshot of the same ITextBuffer.

Operators

Equality(SnapshotSpan, SnapshotSpan) Equality(SnapshotSpan, SnapshotSpan) Equality(SnapshotSpan, SnapshotSpan) Equality(SnapshotSpan, SnapshotSpan) Equality(SnapshotSpan, SnapshotSpan)

Determines whether two snapshot spans are the same.

Implicit(SnapshotSpan to Span) Implicit(SnapshotSpan to Span) Implicit(SnapshotSpan to Span) Implicit(SnapshotSpan to Span) Implicit(SnapshotSpan to Span)

Implicitly converts a snapshot span to a span.

Inequality(SnapshotSpan, SnapshotSpan) Inequality(SnapshotSpan, SnapshotSpan) Inequality(SnapshotSpan, SnapshotSpan) Inequality(SnapshotSpan, SnapshotSpan) Inequality(SnapshotSpan, SnapshotSpan)

Determines whether two snapshot spans are different.

Applies to