Exemplo n.º 1
0
        public AllocatedList(ListAllocator <T> allocator, int capacity)
        {
            this.allocator = allocator;
            ArraySegment <T> allocation = allocator.Allocate(capacity);

            this.array    = allocation.Array;
            this.offset   = allocation.Offset;
            this.capacity = capacity;
            this.count    = 0;
            this.comparer = EqualityComparer <T> .Default;
        }
Exemplo n.º 2
0
 public AllocatedList(ListAllocator <T> allocator, IList <T> other)
     : this(allocator, other.Count)
 {
     AddRange(other, 0, other.Count);
 }
Exemplo n.º 3
0
 public AllocatedList(ListAllocator <T> allocator)
     : this(allocator, 10)
 {
 }
Exemplo n.º 4
0
 public AllocatedList(ListAllocator <T> allocator, int capacity, int count)
     : this(allocator, capacity)
 {
     this.count = count;
 }