/// <summary> /// clean tree from nodes /// </summary> public void clean() { NodeBase node = _root; // in case there are multiple roots, there is 1 root and siblings to that root. // so when the 1st root is deleted, its next sibling becomes the new root. while (_root != null) { deleteWithChildren(_root.NodeId); } _size = 0; updateArrays(); _root = null; _lastRootSibling = null; Debug.Assert(NodeInExpand == null); NodeInExpand = null; Debug.Assert(_nodeInCreation == null); _nodeInCreation = null; }
/// <summary> /// remember details of node that we r creating /// </summary> /// <param name = "parentLine"></param> /// <param name = "prevLine"></param> internal void setNodeInCreation(int parentLine, int prevLine) { _nodeInCreation = new NodeInCreation(parentLine, prevLine); }