コード例 #1
0
        private void createRule(int percent, List <Product> productList, StatusProduct status)
        {
            var rule = new DiscountRule(percent, productList, status);

            this.cost += rule.discount();
            this.rules.Add(rule);
        }
コード例 #2
0
 public DiscountRule(int discountPersent, List <Product> items, StatusProduct status)
 {
     this.statusProduct   = status;
     this.discountPersent = discountPersent;
     this.items           = items;
 }