public void Execute(Order order, Customer customer) { foreach (var pair in predicatesToCommands) { if(pair.Key(order, customer)) pair.Value.Execute(order); } }
public void Execute(Order order) { Console.WriteLine("deny sale"); }
public void Execute(Order order) { Console.WriteLine("Would you like to be a preferred customer?"); }
public void Execute(Order order) { Console.WriteLine("Applying discount of {0:0%}, pay only: {1:C}", discountPrecentage, order.Total - (order.Total * discountPrecentage)); }