public RedDotNode AddChild(RedDotRef item) { var child = Children.Find(c => c.Item == item); if (child != null) { return(child); } var nodeItem = new RedDotNode(item) { Root = Root, Parent = this }; Children.Add(nodeItem); return(nodeItem); }
public RedDotNode(RedDotRef item) { Item = item; Root = this; }