예제 #1
0
 public override void SetParent(PersistentTreeBase <T> parent)
 {
     base.SetParent(parent);
     foreach (var child in Elements)
     {
         child.SetParent(this);
     }
 }
예제 #2
0
        /// <summary> Sets the parent of this persistent tree node. Throws if it is already set. Specify null to indicate this is the root. </summary>
        public virtual void SetParent(PersistentTreeBase <T> parent)
        {
            Contract.Requires(this.parent == null);

            this.parent = parent ?? noParent;
        }