Beispiel #1
0
 /// <summary>
 /// 构造
 /// </summary>
 /// <param name="linked"></param>
 public XLLinked(XLLinked <T> linked)
 {
     if (linked != null && linked.Count > 0)
     {
         XLLinkedNode <T> temp = linked.StartNode;
         while (temp != null)
         {
             add(temp);
             temp = temp.Next;
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="linked"></param>
        /// <param name="pool"></param>
        public XLLinked(XLLinked <T> linked, XLLinkedNodePool <T> pool)
        {
            _pool = pool;

            if (linked != null && linked.Count > 0)
            {
                XLLinkedNode <T> last = null;
                XLLinkedNode <T> temp = linked.StartNode;
                while (temp != null)
                {
                    XLLinkedNode <T> newNode = createNode();
                    newNode.Data = temp.Data;
                    add(newNode);
                }
            }
        }