Example #1
0
        //    public Action<object, MealReadyEventArgs> delegate_event_handler;

        public void TakeOutMealFromKitchen(object sender, MealReadyEventArgs e)
        {
            if (sender is Kitchen)
            {

            }
            Console.WriteLine("Wait was informed that the meal is ready...");
            Console.WriteLine($"The waiter will take the {(e.Dessert ? "dessert" : "course")} {e.DishName} to the table");
        }
Example #2
0
 public void AddMealToDaySum(object sender, MealReadyEventArgs e)
 {
     Console.WriteLine($"Cashier was notified upon new meal for customer in the price of {e.Price}");
     total_balance += e.Price;
 }