Пример #1
0
 /// <summary>
 /// クローンを作る
 /// </summary>
 /// <param name="parent"></param>
 /// <returns></returns>
 public override RawlerBase Clone(RawlerBase parent)
 {
     var clone = new SubTree();
     RawlerLib.ObjectLib.FildCopy(this, clone);
     clone.SetParent(parent);
     this.CloneEvent(clone);
     clone.children.Clear();
     foreach (var item in this.Children)
     {
         var child = item.Clone(clone);
         clone.AddChildren(child);
     }
     return clone;
 }
Пример #2
0
        /// <summary>
        /// クローンを作る
        /// </summary>
        /// <param name="parent"></param>
        /// <returns></returns>
        public override RawlerBase Clone(RawlerBase parent)
        {
            var clone = new SubTree();

            RawlerLib.ObjectLib.FildCopy(this, clone);
            clone.SetParent(parent);
            this.CloneEvent(clone);
            clone.children.Clear();
            foreach (var item in this.Children)
            {
                var child = item.Clone(clone);
                clone.AddChildren(child);
            }
            return(clone);
        }