NormalizedSnapshotSpanCollection Class
A read-only collection of SnapshotSpan objects, all from the same snapshot.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
| Name | Description | |
|---|---|---|
![]() | 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 Span objects. |
![]() | NormalizedSnapshotSpanCollection(ITextSnapshot, IEnumerable<Span>) | Initializes a new instance of a NormalizedSnapshotSpanCollection from a list of Span objects and a ITextSnapshot. |
![]() | NormalizedSnapshotSpanCollection(ITextSnapshot, IList<Span>) | Initializes a new instance of a NormalizedSnapshotSpanCollection from a NormalizedSpanCollection 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. |
| Name | Description | |
|---|---|---|
![]() | Count | Gets the number of spans in the collection. |
![]() | Item[Int32] | Gets the snapshot span at the specified location. |
| Name | Description | |
|---|---|---|
![]() | 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 the specified array of snapshot spans at the specified location. |
![]() ![]() | Difference(NormalizedSnapshotSpanCollection, NormalizedSnapshotSpanCollection) | Calculates the difference between two normalized snapshot span collections and normalizes the result. |
![]() | Equals(Object) | Determines whether two snapshot span collections are the same.(Overrides Object.Equals(Object).) |
![]() | GetEnumerator() | Gets an enumerator for the collection. |
![]() | GetHashCode() | Gets a hash code for the collection.(Overrides Object.GetHashCode().) |
![]() | GetType() | (Inherited from Object.) |
![]() | IndexOf(Object) | Gets the index of the specified snapshot span. |
![]() | IndexOf(SnapshotSpan) | Gets the index of the specified SnapshotSpan. |
![]() ![]() | Intersection(NormalizedSnapshotSpanCollection, NormalizedSnapshotSpanCollection) | Calculates 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) | Calculates the overlap of two normalized snapshot span collections and normalizes the result. |
![]() | OverlapsWith(NormalizedSnapshotSpanCollection) | Determines whether this normalized snapshot span collection overlaps with another collection. |
![]() | OverlapsWith(SnapshotSpan) | Determines whether this span set overlaps with another span. |
![]() | ToString() | Converts the spans to a string.(Overrides Object.ToString().) |
![]() ![]() | Union(NormalizedSnapshotSpanCollection, NormalizedSnapshotSpanCollection) | Calculates the union of two snapshot span collections and normalizes the result. |
| Name | Description | |
|---|---|---|
![]() ![]() | 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. |
| Name | Description | |
|---|---|---|
![]() ![]() | ICollection<SnapshotSpan>.Add(SnapshotSpan) | |
![]() ![]() | ICollection<SnapshotSpan>.Clear() | |
![]() ![]() | ICollection<SnapshotSpan>.Remove(SnapshotSpan) | |
![]() ![]() | IList<SnapshotSpan>.Insert(Int32, SnapshotSpan) | |
![]() ![]() | IList<SnapshotSpan>.RemoveAt(Int32) | |
![]() ![]() | 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.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. |
For more information about snapshots, see the section "A Closer Look at the Text Model and the Text View" in Inside the Editor.
The snapshot spans are sorted by start position. Adjacent and overlapping spans are combined.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.






