예제 #1
0
 public Enumerator(NetArray <T, NetRef <T> > array)
 {
     _array   = array;
     _index   = 0;
     _current = null;
     _done    = false;
 }
예제 #2
0
 private void hookArray(NetArray <T, TField> array)
 {
     for (int i = 0; i < array.Count; i++)
     {
         hookField(i, array.Fields[i]);
     }
     array.OnFieldCreate += hookField;
 }
예제 #3
0
        private void Resize(int capacity)
        {
            count.Set(Math.Min(capacity, count));
            NetArray <T, TField> oldArray = array.Value;
            NetArray <T, TField> newArray = new NetArray <T, TField>(capacity);

            array.Value = newArray;
            for (int i = 0; i < capacity && i < Count; i++)
            {
                T tmp = oldArray[i];
                oldArray[i]    = default(T);
                array.Value[i] = tmp;
            }
        }
예제 #4
0
 public bool Equals(NetArray <T, TField> other)
 {
     return(object.Equals(elements, other.elements));
 }