Exemplo n.º 1
0
 public FlagArray(int capacity)
 {
     if (capacity < 0)
     {
         throw new ArgumentOutOfRangeException(nameof(capacity), "length < 0");
     }
     Capacity = capacity;
     _entries = ArrayReservoir <int> .GetArray(GetLength(Capacity));
 }
Exemplo n.º 2
0
        public FlagArray(int length)
        {
            if (length < 0)
            {
                throw new ArgumentOutOfRangeException("length", "length < 0");
            }
            _length  = length;
            _entries = ArrayReservoir <int> .GetArray(GetLength(_length));

            _asReadOnly = new ExtendedReadOnlyCollection <bool>(this);
        }
Exemplo n.º 3
0
        public FlagArray(int capacity)
        {
            if (capacity < 0)
            {
                throw new ArgumentOutOfRangeException("capacity", "length < 0");
            }
            _capacity = capacity;
            _entries  = ArrayReservoir <int> .GetArray(GetLength(_capacity));

            _asReadOnly = new ExtendedReadOnlyCollection <bool>(this);
        }
Exemplo n.º 4
0
        public FlagArray(int capacity)
        {
            if (capacity < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(capacity), "length < 0");
            }
            Capacity = capacity;
            _entries = ArrayReservoir <int> .GetArray(GetLength(Capacity));

            _asReadOnly = Extensions.WrapAsIReadOnlyCollection(this);
        }
Exemplo n.º 5
0
        public FlagArray(FlagArray prototype)
        {
            if (prototype == null)
            {
                throw new ArgumentNullException(nameof(prototype), "prototype is null.");
            }
            Capacity = prototype.Capacity;
            _entries = ArrayReservoir <int> .GetArray(GetLength(Capacity));

            prototype._entries.CopyTo(_entries, 0);
        }
Exemplo n.º 6
0
        public FlagArray(FlagArray prototype)
        {
            if (ReferenceEquals(prototype, null))
            {
                throw new ArgumentNullException("prototype", "prototype is null.");
            }
            _length  = prototype._length;
            _entries = ArrayReservoir <int> .GetArray(GetLength(_length));

            prototype._entries.CopyTo(_entries, 0);
            _asReadOnly = new ExtendedReadOnlyCollection <bool>(this);
        }
Exemplo n.º 7
0
        public ReverseStringBuilder(int capacity)
        {
            if (capacity < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(capacity));
            }

            _buffer = ArrayReservoir <char> .GetArray(capacity);

            _capacity = capacity;
            _start    = capacity;
        }
Exemplo n.º 8
0
        public FlagArray(FlagArray prototype)
        {
            if (prototype == null)
            {
                throw new ArgumentNullException(nameof(prototype), "prototype is null.");
            }
            Capacity = prototype.Capacity;
            _entries = ArrayReservoir <int> .GetArray(GetLength(Capacity));

            prototype._entries.CopyTo(_entries, 0);
            _asReadOnly = Extensions.WrapAsIReadOnlyCollection(this);
        }