protected virtual void OnOrderDeterrioration(KitchenShelf shelf, ShelfOrder shelfOrder) { shelfOrder.StopAllTimers(); RemoveOrderFromShelf(shelf, shelfOrder); shelfNotificationService.PublishOrderDeterrioratedEvent(shelfOrder.Order); }
protected virtual void OnCourierArrival(ShelfOrder shelfOrder, KitchenShelf shelf, Timer timer) { shelfOrder.StopAllTimers(); shelf.Remove(shelfOrder); shelfNotificationService.PublishOrderReceivedByCourierEvent(shelfOrder.Order, (int)timer.Interval / 1000); }