Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/src/commit/0861e5f8c146846ada7c36f231a91ed2c597540c/NzbDrone.Common/Expansive/TreeNode.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
Sonarr/NzbDrone.Common/Expansive/TreeNode.cs

85 lines
2.0 KiB

using System.Collections.Generic;
namespace NzbDrone.Common.Expansive
{
internal class TreeNode<T>
{
private List<T> _CallTree;
private TreeNode<T> _Parent;
public TreeNode(T Value)
{
this.Value = Value;
Parent = null;
Children = new TreeNodeList<T>(this);
_CallTree = new List<T>();
}
public TreeNode(T Value, TreeNode<T> Parent)
{
this.Value = Value;
this.Parent = Parent;
Children = new TreeNodeList<T>(this);
_CallTree = new List<T>();
}
public TreeNode<T> Parent
{
get { return _Parent; }
set
{
if (value == _Parent)
{
return;
}
if (_Parent != null)
{
_Parent.Children.Remove(this);
}
if (value != null && !value.Children.Contains(this))
{
value.Children.Add(this);
}
_Parent = value;
}
}
public TreeNode<T> Root
{
get
{
//return (Parent == null) ? this : Parent.Root;
TreeNode<T> node = this;
while (node.Parent != null)
{
node = node.Parent;
}
return node;
}
}
public TreeNodeList<T> Children { get; private set; }
public List<T> CallTree
{
get
{
_CallTree = new List<T>();
TreeNode<T> node = this;
while (node.Parent != null)
{
node = node.Parent;
_CallTree.Add(node.Value);
}
return _CallTree;
}
private set { _CallTree = value; }
}
public T Value { get; set; }
}
}