You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sonarr/src/NzbDrone.Common/Expansive/TreeNodeList.cs

32 lines
664 B

11 years ago
using System.Collections.Generic;
namespace NzbDrone.Common.Expansive
{
internal class TreeNodeList<T> : List<TreeNode<T>>
{
public TreeNode<T> Parent;
3 years ago
public TreeNodeList(TreeNode<T> parent)
11 years ago
{
3 years ago
this.Parent = parent;
11 years ago
}
3 years ago
public new TreeNode<T> Add(TreeNode<T> node)
11 years ago
{
3 years ago
base.Add(node);
node.Parent = Parent;
return node;
11 years ago
}
3 years ago
public TreeNode<T> Add(T value)
11 years ago
{
3 years ago
return Add(new TreeNode<T>(value));
11 years ago
}
public override string ToString()
{
return "Count=" + Count.ToString();
}
}
3 years ago
}