Exemple #1
0
 public Price CalculateValue(Price price)
 {
     return(CalculateValue(price, new NonDiscountPolicy()));
 }
Exemple #2
0
        public Price CalculateValue(Price price, IDiscountPolicy discountPolicy)
        {
            var priceAfterDiscount = discountPolicy.CalculatePrice(price);

            return(_amount * priceAfterDiscount);
        }