NormalizedTextRangeCollection Class

Definition

A sorted list of TextRange values all referencing the same document snapshot. The ranges are non-empty, non-adjacent and non-overlapping.

C#
public class NormalizedTextRangeCollection : System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.Extensibility.Editor.TextRange>, System.Collections.Generic.IReadOnlyCollection<Microsoft.VisualStudio.Extensibility.Editor.TextRange>, System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.Extensibility.Editor.TextRange>
Inheritance
NormalizedTextRangeCollection
Implements

Properties

Count

Gets the number of elements in the collection.

Item[Int32]

Gets the element at the specified index in the read-only list.

TextDocumentSnapshot

Gets the document snapshot that all ranges in this collection reference. This is guaranteed to be non-null if the collection is not empty.

Methods

GetEnumerator()

Returns an enumerator that iterates through the collection.

Intersect(IEnumerable<TextRange>)

Intersects the current collection with another collection of ranges.

Intersect(NormalizedTextRangeCollection)

Intersects the current collection with another collection of ranges.

TranslateTo(ITextDocumentSnapshot, TextRangeTrackingMode)

Translates the ranges in this collection to a new document snapshot.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Extension Methods

EmptyIfNull<T>(IEnumerable<T>)

Return this enumeration in case it is not null. In case it is null return empty enumeration.

Applies to

Produit Versions
Visual Studio SDK 2022