private UrlNode(UrlNode parent, string path) { this.parent = parent; this.path = path; if (parent != null) { parent.Children.Add(this); } }
public bool IntersectsWith(UrlNode urlTree) { if (urlTree == null) { throw new ArgumentNullException("urlTrees"); } return DescendantsAndSelf() .Intersect(urlTree.DescendantsAndSelf(), comparer) .Any(); }