mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
added Expansive
This commit is contained in:
parent
652a9d4a8a
commit
6a5c10a456
8 changed files with 435 additions and 0 deletions
32
NzbDrone.Common/Expansive/TreeNodeList.cs
Normal file
32
NzbDrone.Common/Expansive/TreeNodeList.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue