示例#1
0
        public virtual void Insert(int index, DataObjectBase value)
        {
            // This item is obfuscated and can not be translated.
            int num = 9;

Label_000D:
            switch (num)
            {
            case 0:
                break;

            case 1:
                throw new ArgumentOutOfRangeException("index", index, "Argument cannot be negative.");

            case 2:
                goto Label_0161;

            case 3:
                if (index >= this._count)
                {
                    goto Label_0161;
                }
                num = 5;
                goto Label_000D;

            case 4:
                if (index <= this._count)
                {
                    num = 6;
                }
                else
                {
                    num = 8;
                }
                goto Label_000D;

            case 5:
                Array.Copy(this._array, index, this._array, index + 1, this._count - index);
                num = 2;
                goto Label_000D;

            case 6:
                if (this._count != this._array.Length)
                {
                    break;
                }
                num = 7;
                goto Label_000D;

            case 7:
                this.EnsureCapacity(this._count + 1);
                num = 0;
                goto Label_000D;

            case 8:
                throw new ArgumentOutOfRangeException("index", index, "Argument cannot exceed Count.");

            default:
                if (index >= 0)
                {
                    num = 4;
                }
                else
                {
                    num = 1;
                }
                goto Label_000D;
            }

            this._version++;
            num = 3;
            goto Label_000D;
Label_0161:
            this._array[index] = value;
            this._count++;
        }
示例#2
0
 public virtual bool Contains(DataObjectBase value)
 {
     return(this.IndexOf(value) >= 0);
 }
示例#3
0
 public virtual int IndexOf(DataObjectBase value)
 {
     return(Array.IndexOf <DataObjectBase>(this._array, value, 0, this._count));
 }
示例#4
0
 public virtual int BinarySearch(DataObjectBase value)
 {
     return(Array.BinarySearch <DataObjectBase>(this._array, 0, this._count, value));
 }
示例#5
0
 public override void Remove(DataObjectBase value)
 {
     throw new NotSupportedException("Read-only collections cannot be modified.");
 }
示例#6
0
 public override int IndexOf(DataObjectBase value)
 {
     return(this._collection.IndexOf(value));
 }
示例#7
0
 public override bool Contains(DataObjectBase value)
 {
     return(this._collection.Contains(value));
 }
示例#8
0
 public override int BinarySearch(DataObjectBase value)
 {
     return(this._collection.BinarySearch(value));
 }