Ejemplo n.º 1
0
 public void RaiseWrongFoodProvided(Food food)
 {
     if (WrongFoodProvided != null)
     {
         var args = new FoodEventArgs();
         args.Food = food;
         WrongFoodProvided(this, args);
     }
 }
Ejemplo n.º 2
0
 private static void OnWrongFoodProvided(object sender, FoodEventArgs eventArgs)
 {
     Console.WriteLine("*****************************");
     Console.WriteLine($"The food : {eventArgs.Food.Type()} was not eaten.");
     Console.WriteLine("*****************************");
 }