public void NotifyOrderFinish(Order order) { IDeliveryMan deliveryMan = _ordersInOven[order]; order.SetOrderState(EOrderStateType.DeliveryState); deliveryMan.Deliver(order); }
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); }