コード例 #1
0
 public static IDbSchemaProviderCollection ReadOnly(IDbSchemaProviderCollection collection)
 {
     if (collection == null)
     {
         throw new ArgumentNullException("collection");
     }
     return(new ReadOnlyList(collection));
 }
コード例 #2
0
 public static IDbSchemaProviderCollection Synchronized(IDbSchemaProviderCollection collection)
 {
     if (collection == null)
     {
         throw new ArgumentNullException("collection");
     }
     return(new SyncList(collection));
 }
コード例 #3
0
 public override void AddRange(IDbSchemaProviderCollection collection)
 {
     lock (this._root)
     {
         this._collection.AddRange(collection);
     }
     return;
 }
コード例 #4
0
        public virtual void AddRange(IDbSchemaProviderCollection collection)
        {
            int num = 6;

Label_000D:
            switch (num)
            {
            case 0:
                goto Label_00C9;

            case 1:
                if (collection.Count != 0)
                {
                    num = 4;
                }
                else
                {
                    num = 5;
                }
                goto Label_000D;

            case 2:
                break;

            case 3:
                this.EnsureCapacity(this._count + collection.Count);
                num = 0;
                goto Label_000D;

            case 4:
                if ((this._count + collection.Count) <= this._array.Length)
                {
                    goto Label_00C9;
                }
                num = 3;
                goto Label_000D;

            case 5:
                return;

            default:
                if (collection != null)
                {
                    num = 1;
                }
                else
                {
                    num = 2;
                }
                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;
        }
コード例 #5
0
 public IDbSchemaProviderCollection(IDbSchemaProviderCollection collection)
 {
     if (collection == null)
     {
         throw new ArgumentNullException("collection");
     }
     this._array = new IDbSchemaProvider[collection.Count];
     this.AddRange(collection);
 }
コード例 #6
0
        public virtual object Clone()
        {
            IDbSchemaProviderCollection providers;

            goto Label_0003;

Label_0003:
            providers = new IDbSchemaProviderCollection(this._count);
            Array.Copy(this._array, 0, providers._array, 0, this._count);
            providers._count   = this._count;
            providers._version = this._version;
            return(providers);
        }
コード例 #7
0
 internal SyncList(IDbSchemaProviderCollection collection) : base(IDbSchemaProviderCollection.Tag.Default)
 {
     this._root       = collection.SyncRoot;
     this._collection = collection;
 }
コード例 #8
0
 public override void AddRange(IDbSchemaProviderCollection collection)
 {
     throw new NotSupportedException("Read-only collections cannot be modified.");
 }
コード例 #9
0
 internal ReadOnlyList(IDbSchemaProviderCollection collection) : base(IDbSchemaProviderCollection.Tag.Default)
 {
     this._collection = collection;
 }
コード例 #10
0
 internal Enumerator(IDbSchemaProviderCollection collection)
 {
     this._collection = collection;
     this._version    = collection._version;
     this._index      = -1;
 }