public void BuildBranch(string name) { XBranch node = new XBranch(name); _stack.Peek().AddChild(node); _stack.Push(node); }
public XBuilder() { _root = new XBranch("root"); _stack = new Stack <XBranch>(); _stack.Push(_root); }