public decimal CalculateDiscount(Order order)
 {
     if (canDiscountStrategy.CanDiscount(order))
     {
         return(calculateDiscountStrategy.Discount(order));
     }
     else
     {
         return(0);
     }
 }
Beispiel #2
0
 public decimal CalculateDiscount(Order order)
 {
     // 1. Warunek
     if (canDiscountStrategy.CanDiscount(order))
     {
         // 2. Zniżka
         return(discountStrategy.Discount(order));
     }
     else
     {
         return(0);
     }
 }