Table of Contents

Class TreeNodeCollection<TParent, TChild>

Namespace
Echo.Graphing
Assembly
Echo.dll

Represents a collection of tree node children

public class TreeNodeCollection<TParent, TChild> : Collection<TChild>, IList<TChild>, ICollection<TChild>, IReadOnlyList<TChild>, IReadOnlyCollection<TChild>, IEnumerable<TChild>, IList, ICollection, IEnumerable where TParent : TreeNodeBase where TChild : TreeNodeBase

Type Parameters

TParent

The type of the parent

TChild

The node to create a collection of

Inheritance
Collection<TChild>
TreeNodeCollection<TParent, TChild>
Implements
IList<TChild>
ICollection<TChild>
IEnumerable<TChild>
Inherited Members

Constructors

TreeNodeCollection(TParent)

Creates a new tree node collection with the specified owner

public TreeNodeCollection(TParent owner)

Parameters

owner TParent

The owner whose children this collection represents

Methods

AssertNoParent(TChild)

Asserts that the provided node is not already added to another tree node.

protected static void AssertNoParent(TChild node)

Parameters

node TChild

The node to verify.

Exceptions

ArgumentException

Occurs if the node is already added to another node.

ClearItems()

protected override void ClearItems()

InsertItem(int, TChild)

protected override void InsertItem(int index, TChild item)

Parameters

index int
item TChild

RemoveItem(int)

protected override void RemoveItem(int index)

Parameters

index int

SetItem(int, TChild)

protected override void SetItem(int index, TChild item)

Parameters

index int
item TChild