protected virtual void GetAncestorsInternal(ISiteMapNode node, ISiteMapNodeCollection ancestors) { if (node.ParentNode != null) { ancestors.Add(node.ParentNode); GetAncestorsInternal(node.ParentNode, ancestors); } }
protected virtual void GetDescendantsInternal(ISiteMapNode node, ISiteMapNodeCollection descendants) { foreach (var child in node.ChildNodes) { descendants.Add(child); GetDescendantsInternal(child, descendants); } }