//API /// <summary> /// Create new instance of <see cref="BlockCollection{T}"/> with specified <paramref name="balancer"/> /// and <paramref name="internalBlockCollection"/>. /// </summary> /// <param name="balancer">Balancer we use to get information about block sizes</param> /// <param name="internalBlockCollection">Collection which used to real containing of blocks</param> public BlockCollection(IBalancer balancer, IBigList <Block <T> > internalBlockCollection) { _balancer = balancer; _blocks = internalBlockCollection; IsReadOnly = false; }
/// <summary> /// Create new instance of <see cref="BigArrayConfiguration{T}"/> with specified <paramref name="balancer"/> /// and <paramref name="blockCollection"/>. /// </summary> /// <param name="balancer">Object to manage block size logic</param> /// <param name="blockCollection"> Collection for storage blocks of <see cref="BigArray"/>. You can /// defint you own collection for it to controll it. For example you can send BigArray{Block{T}} /// and have second level distribution.</param> public BigArrayConfiguration(IBalancer balancer, IBigList <Block <T> > blockCollection) : this() { if (balancer == null) { throw new ArgumentNullException("balancer", "Configuration must contains balancer!"); } if (blockCollection == null) { throw new ArgumentNullException("balancer", "Configuration must contains block collection!"); } Balancer = balancer; BlockCollection = blockCollection; }
/// <summary> /// Create new instance of <see cref="BigArrayConfiguration{T}"/> with specified <paramref name="blockCollection"/> /// and default balancer. /// </summary> /// <param name="blockCollection"> Collection for storage blocks of <see cref="BigArray"/>. You can /// defint you own collection for it to controll it. For example you can send BigArray{Block{T}} /// and have second level distribution.</param> public BigArrayConfiguration(IBigList <Block <T> > blockCollection) : this(DefaultConfiguration.Balancer, blockCollection) { }
/// <summary> /// Create new instance of <see cref="BlockCollection{T}"/> with specified <paramref name="internalBlockCollection"/> /// and default balancer (<see cref="FixedBalancer"/>). /// </summary> /// <param name="internalBlockCollection">Collection which used to real containing of blocks</param> public BlockCollection(IBigList <Block <T> > internalBlockCollection) : this(new FixedBalancer(), internalBlockCollection) { }