コード例 #1
0
        public double Apply(Checkout.ItemCodeCounts item, Offers offer)
        {
            var offerCount = item.Count / offer.ItemCount;
            var itemsLeft  = item.Count % offer.ItemCount;

            item.Count = itemsLeft;
            return(offer.DiscountPrice * offerCount);
        }
コード例 #2
0
 public double Apply(Checkout.ItemCodeCounts item, IOffers offer)
 {
     return(Apply(item, (Offers)offer));
 }