public Enumerator(NetArray <T, NetRef <T> > array) { _array = array; _index = 0; _current = null; _done = false; }
private void hookArray(NetArray <T, TField> array) { for (int i = 0; i < array.Count; i++) { hookField(i, array.Fields[i]); } array.OnFieldCreate += hookField; }
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; } }
public bool Equals(NetArray <T, TField> other) { return(object.Equals(elements, other.elements)); }