private void AddNode(CategoryTreeNode node)
 {
     if (_depth + 1 == Category.MAX_CATEGORIES_DEPTH)
     {
         throw new DomainException("");
     }
     node._depth = _depth + 1;
     SubCategories.Add(node);
 }
 public CategoryTreeNode(string categoryName, int categoryId, CategoryTreeNode parent)
 {
     CategoryName = categoryName;
     CategoryId   = categoryId;
     if (parent != null)
     {
         _parent = parent;
         _parent.AddNode(this);
     }
 }