public FlagArray(int capacity) { if (capacity < 0) { throw new ArgumentOutOfRangeException(nameof(capacity), "length < 0"); } Capacity = capacity; _entries = ArrayReservoir <int> .GetArray(GetLength(Capacity)); }
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); }
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); }
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); }
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); }
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); }
public ReverseStringBuilder(int capacity) { if (capacity < 0) { throw new ArgumentOutOfRangeException(nameof(capacity)); } _buffer = ArrayReservoir <char> .GetArray(capacity); _capacity = capacity; _start = capacity; }
private void RecycleExtracted() { // Assume anything could have been set to null, start no sync operation, this could be running during DomainUnload var entries = _entries; if (entries != null) { ArrayReservoir <int> .DonateArray(entries); _entries = null; } }
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); }
private void RecycleExtracted() { ArrayReservoir <int> .DonateArray(_entries); _entries = null; }