Class DomNodeList<T>
An ordered collection of child nodes that maintains parent links: adding a node sets its Parent, removing clears it. A node can belong to at most one parent at a time; move a node by removing it (or cloning it) first.
public sealed class DomNodeList<T> : IList<T>, ICollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable where T : DomNode
Type Parameters
TThe node type the collection holds.
- Inheritance
-
DomNodeList<T>
- Implements
-
IList<T>ICollection<T>IEnumerable<T>
- Inherited Members
Properties
- Count
Gets the number of nodes in the collection.
- IsReadOnly
Gets a value indicating whether the collection is read-only; always false.
- this[int]
Gets or sets the node at the given index; setting detaches the replaced node.
Methods
- Add(T)
Appends a node.
- Clear()
Removes and detaches every node.
- Contains(T)
Determines whether the collection contains a node.
- CopyTo(T[], int)
Copies the nodes to an array.
- GetEnumerator()
Returns an enumerator over the nodes in document order.
- IndexOf(T)
Returns the index of a node, or -1.
- Insert(int, T)
Inserts a node at the given index.
- Remove(T)
Removes the first occurrence of a node.
- RemoveAt(int)
Removes the node at the given index and detaches it.