Пример #1
0
        public InternalDList <T> Clone()
        {
            InternalDList <T> clone = new InternalDList <T>();

            clone._array = new T[Count];
            CopyTo(clone._array, 0);
            clone._start = 0;
            clone._count = Count;
            return(clone);
        }
Пример #2
0
 public AListLeaf(AListLeaf <K, T> frozen)
 {
     // TODO: Rethink: original node doesn't have to be frozen because we are deep-cloning. Right??
     //       Probably DetachedClone() doesn't have to freeze a leaf node.
     Debug.Assert(frozen.IsFrozen);
     _list        = frozen._list.Clone();
     _maxNodeSize = frozen._maxNodeSize;
     _isFrozen    = false;
     //_userByte = frozen._userByte;
 }
Пример #3
0
 internal static void RemovingItems <K, T>(this IAListTreeObserver <K, T> self, InternalDList <T> list, int index, int count, AListLeaf <K, T> parent, bool isMoving)
 {
     for (int i = index; i < index + count; i++)
     {
         self.ItemRemoved(list[i], parent);
     }
 }
Пример #4
0
 public AListLeaf(ushort maxNodeSize, InternalDList <T> list) : this(maxNodeSize)
 {
     _list = list;
 }
Пример #5
0
 public BListLeaf(ushort maxNodeSize, InternalDList <T> list) : base(maxNodeSize, list)
 {
 }