NormalizedSnapshotSpanCollection Class

Definition

A read-only collection of SnapshotSpan objects, all from the same snapshot.

public ref class NormalizedSnapshotSpanCollection sealed : System::Collections::Generic::ICollection<Microsoft::VisualStudio::Text::SnapshotSpan>, System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::Text::SnapshotSpan>, System::Collections::Generic::IList<Microsoft::VisualStudio::Text::SnapshotSpan>, System::Collections::IList
public sealed class NormalizedSnapshotSpanCollection : System.Collections.Generic.ICollection<Microsoft.VisualStudio.Text.SnapshotSpan>, System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.Text.SnapshotSpan>, System.Collections.Generic.IList<Microsoft.VisualStudio.Text.SnapshotSpan>, System.Collections.IList
type NormalizedSnapshotSpanCollection = class
    interface IList<SnapshotSpan>
    interface ICollection<SnapshotSpan>
    interface seq<SnapshotSpan>
    interface IEnumerable
    interface IList
    interface ICollection
Public NotInheritable Class NormalizedSnapshotSpanCollection
Implements ICollection(Of SnapshotSpan), IEnumerable(Of SnapshotSpan), IList, IList(Of SnapshotSpan)
Inheritance
NormalizedSnapshotSpanCollection
Implements

Remarks

The snapshot spans are sorted by start position, with adjacent and overlapping spans combined.

Constructors

NormalizedSnapshotSpanCollection()

Initializes an empty NormalizedSnapshotSpanCollection.

NormalizedSnapshotSpanCollection(IEnumerable<SnapshotSpan>)

Initializes a new instance of a NormalizedSnapshotSpanCollection from a list of SnapshotSpan objects.

NormalizedSnapshotSpanCollection(IList<SnapshotSpan>)

Initializes a new instance of a NormalizedSnapshotSpanCollection from a list of SnapshotSpan objects.

NormalizedSnapshotSpanCollection(ITextSnapshot, IEnumerable<Span>)

Initializes a new instance of a NormalizedSnapshotSpanCollection from a list of Spans and a ITextSnapshot.

NormalizedSnapshotSpanCollection(ITextSnapshot, IList<Span>)

Initializes a new instance of a NormalizedSnapshotSpanCollection from a list of Spans and a ITextSnapshot.

NormalizedSnapshotSpanCollection(ITextSnapshot, NormalizedSpanCollection)

Initializes a new instance of a NormalizedSnapshotSpanCollection from a NormalizedSpanCollection and a ITextSnapshot.

NormalizedSnapshotSpanCollection(ITextSnapshot, Span)
NormalizedSnapshotSpanCollection(SnapshotSpan)

Initializes a new instance of a NormalizedSnapshotSpanCollection with a single element.

Fields

Empty

Properties

Count

Gets the number of spans in the collection.

Item[Int32]

Gets the snapshot span at the specified location. The setter throws a NotSupportedException.

Methods

CloneAndTrackTo(ITextSnapshot, SpanTrackingMode)
Contains(Object)

Determines whether the collection contains the specified snapshot span.

Contains(SnapshotSpan)

Determines whether the collection contains the specified snapshot span.

CopyTo(Array, Int32)

Copies the snapshot spans in this collection to the specified array, starting at the specified index.

CopyTo(SnapshotSpan[], Int32)

Copies the collection to an array of snapshot spans at the specified location.

Difference(NormalizedSnapshotSpanCollection, NormalizedSnapshotSpanCollection)

Computes the difference between two normalized snapshot span collections and normalizes the result.

Equals(Object)

Determines whether two snapshot span collections are equal

GetEnumerator()

Gets an enumerator for the collection.

GetHashCode()

Gets a hash code for the collection.

IndexOf(Object)

Gets the index of the specified snapshot span.

IndexOf(SnapshotSpan)

Gets the index of the specified SnapshotSpan.

Intersection(NormalizedSnapshotSpanCollection, NormalizedSnapshotSpanCollection)

Computes the intersection of two normalized snapshot span collections and normalizes the result.

IntersectsWith(NormalizedSnapshotSpanCollection)

Determines whether this collection intersects with another normalized snapshot span collection.

IntersectsWith(SnapshotSpan)

Determines whether this collection overlaps with a snapshot span.

Overlap(NormalizedSnapshotSpanCollection, NormalizedSnapshotSpanCollection)

Computes the overlap of two normalized snapshot span collections and normalizes the result.

OverlapsWith(NormalizedSnapshotSpanCollection)

Determines whether this collection overlaps with another normalized snapshot span collection.

OverlapsWith(SnapshotSpan)

Determines whether this collection overlaps with a snapshot span.

ToString()

Converts the spans to a string..

Union(NormalizedSnapshotSpanCollection, NormalizedSnapshotSpanCollection)

Computes the union of two snapshot span collections and normalizes the result.

Operators

Equality(NormalizedSnapshotSpanCollection, NormalizedSnapshotSpanCollection)

Determines whether two NormalizedSnapshotSpanCollection objects are the same.

Implicit(NormalizedSnapshotSpanCollection to NormalizedSpanCollection)

Converts the specified NormalizedSnapshotSpanCollection to a NormalizedSpanCollection.

Inequality(NormalizedSnapshotSpanCollection, NormalizedSnapshotSpanCollection)

Determines whether two NormalizedSnapshotSpanCollection are different..

Explicit Interface Implementations

ICollection.IsSynchronized

Determines whether this collection is synchronized.

ICollection.SyncRoot

Gets an object that can be used to synchronize access to this collection.

ICollection<SnapshotSpan>.Add(SnapshotSpan)

Adds a snapshot span to the collection. This method throws a NotSupportedException.

ICollection<SnapshotSpan>.Clear()

Clears the collection. This method throws a NotSupportedException.

ICollection<SnapshotSpan>.IsReadOnly

Determines whether the collection is read-only. Always returns true.

ICollection<SnapshotSpan>.Remove(SnapshotSpan)

Removes the specified span from the collection. This method throws a NotSupportedException.

IEnumerable.GetEnumerator()

Gets an enumerator for the collection.

IList.Add(Object)

Adds an object to the list. This method throws a NotSupportedException.

IList.Clear()

Clears the list. This method throws a NotSupportedException.

IList.Insert(Int32, Object)

Inserts a snapshot span into the list at the specified location. This method throws a NotSupportedException.

IList.IsFixedSize

Determines whether the collection is of fixed size. Always returns true.

IList.IsReadOnly

Determines whether this collection is read-only. This property always returns true.

IList.Item[Int32]

Gets the snapshot span at the specified location. The setter throws a NotSupportedException.

IList.Remove(Object)

Removes the specified snapshot span. This method throws a NotSupportedException.

IList.RemoveAt(Int32)

Removes a snapshot span at the specified location. This method throws a NotSupportedException.

IList<SnapshotSpan>.Insert(Int32, SnapshotSpan)

Inserts a snapshot span into the list. This method throws a NotSupportedException.

IList<SnapshotSpan>.RemoveAt(Int32)

Removes a snapshot span at the specified location. This method throws a NotSupportedException.

Extension Methods

EmptyIfNull<T>(IEnumerable<T>)

Applies to