Example #1
0
 public void Execute(Meal meal)
 {
     Console.WriteLine("Cutting vegetables for 5 min");
     meal.cutIngredients = true;
 }
Example #2
0
 public void Undo(Meal meal)
 {
     Console.WriteLine("Throwing cut vegetables and replacing for new uncuted ones");
     meal.cutIngredients = false;
 }
 public Invoker(Meal contextMeal)
 {
     this.contextMeal = contextMeal;
     commands         = new Stack <ICommand>();
 }