public static DataObjectBaseCollection Synchronized(DataObjectBaseCollection collection) { if (collection == null) { throw new ArgumentNullException("collection"); } return(new SyncList(collection)); }
public override void AddRange(DataObjectBaseCollection collection) { lock (this._root) { this._collection.AddRange(collection); } return; }
public static DataObjectBaseCollection ReadOnly(DataObjectBaseCollection collection) { if (collection == null) { throw new ArgumentNullException("collection"); } return(new ReadOnlyList(collection)); }
public DataObjectBaseCollection(DataObjectBaseCollection collection) { if (collection == null) { throw new ArgumentNullException("collection"); } this._array = new DataObjectBase[collection.Count]; this.AddRange(collection); }
public virtual void AddRange(DataObjectBaseCollection collection) { int num = 2; Label_000D: switch (num) { case 0: if ((this._count + collection.Count) <= this._array.Length) { goto Label_00C9; } num = 1; goto Label_000D; case 1: this.EnsureCapacity(this._count + collection.Count); num = 3; goto Label_000D; case 3: goto Label_00C9; case 4: if (collection.Count != 0) { num = 0; } else { num = 6; } goto Label_000D; case 5: break; case 6: return; default: if (collection != null) { num = 4; } else { num = 5; } goto Label_000D; } throw new ArgumentNullException("collection"); Label_00C9: this._version++; Array.Copy(collection.InnerArray, 0, this._array, this._count, collection.Count); this._count += collection.Count; }
public virtual object Clone() { DataObjectBaseCollection bases; goto Label_0003; Label_0003: bases = new DataObjectBaseCollection(this._count); Array.Copy(this._array, 0, bases._array, 0, this._count); bases._count = this._count; bases._version = this._version; return(bases); }
internal SyncList(DataObjectBaseCollection collection) : base(DataObjectBaseCollection.Tag.Default) { this._root = collection.SyncRoot; this._collection = collection; }
public override void AddRange(DataObjectBaseCollection collection) { throw new NotSupportedException("Read-only collections cannot be modified."); }
internal ReadOnlyList(DataObjectBaseCollection collection) : base(DataObjectBaseCollection.Tag.Default) { this._collection = collection; }
internal Enumerator(DataObjectBaseCollection collection) { this._collection = collection; this._version = collection._version; this._index = -1; }