mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-29 11:05:44 +00:00
32 lines
664 B
C#
32 lines
664 B
C#
|
using System.Collections.Generic;
|
|||
|
|
|||
|
namespace NzbDrone.Common.Expansive
|
|||
|
{
|
|||
|
internal class TreeNodeList<T> : List<TreeNode<T>>
|
|||
|
{
|
|||
|
public TreeNode<T> Parent;
|
|||
|
|
|||
|
public TreeNodeList(TreeNode<T> Parent)
|
|||
|
{
|
|||
|
this.Parent = Parent;
|
|||
|
}
|
|||
|
|
|||
|
public new TreeNode<T> Add(TreeNode<T> Node)
|
|||
|
{
|
|||
|
base.Add(Node);
|
|||
|
Node.Parent = Parent;
|
|||
|
return Node;
|
|||
|
}
|
|||
|
|
|||
|
public TreeNode<T> Add(T Value)
|
|||
|
{
|
|||
|
return Add(new TreeNode<T>(Value));
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public override string ToString()
|
|||
|
{
|
|||
|
return "Count=" + Count.ToString();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|