public RemainderToBiggestLineService(DistributionParameter <Item> distributeParameter) { _context = distributeParameter; }
public virtual IAmountDistributionService <Item> CreateService <Item>(DistributionMethod method, DistributionParameter <Item> distributeParameter) where Item : class, IAmountItem { switch (method) { case DistributionMethod.RemainderToBiggestLine: return(new RemainderToBiggestLineService <Item>(distributeParameter)); case DistributionMethod.RemainderToLastLine: return(new RemainderToLastLineService <Item>(distributeParameter)); case DistributionMethod.AccumulateRemainderToNonZeroLine: return(new RemainderToLastLineService <Item>(distributeParameter)); default: throw new NotImplementedException(); } }