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

            return(_amount * priceAfterDiscount);
        }