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