Esempio n. 1
0
        public void NotifyOrderFinish(Order order)
        {
            IDeliveryMan deliveryMan = _ordersInOven[order];

            order.SetOrderState(EOrderStateType.DeliveryState);

            deliveryMan.Deliver(order);
        }
Esempio n. 2
0
        public bool PlaceInOven(Order order, IDeliveryMan deliveryMan)
        {
            if (_ordersInOven.ContainsKey(order))
            {
                return(false);
            }

            Console.WriteLine("Order was sent to the kitchen");

            _ordersInOven.Add(order, deliveryMan);
            return(true);
        }