示例#1
0
        public async Task TaskOrderIsReady(Order order)
        {
            // Якобы готовим)
            await Task.Delay(new Random().Next(2000, 5000));

            OnOrderIsReady.Invoke(this, order);
        }
示例#2
0
 public void StartCooking()
 {
     foreach (Order order in OrdersList)
     {
         foreach (KeyValuePair <int, int> keyValue in order.PizzaIdCount)
         {
             CookPizza(PizzasList[keyValue.Key], keyValue.Value);
         }
         OnOrderIsReady?.Invoke(order);
     }
 }