Esempio n. 1
0
        private void ExecuteDriverEvent(DriverEvent e)
        {
            if (_drivers.TryGetValue(e.RouteSymbol, out var driver))
            {
                switch (e.Action)
                {
                case TrackingEventType.Binning:
                    driver.AssignRoute(e);
                    break;

                case TrackingEventType.OutForDelivery:
                    driver.InTransit(e);
                    break;

                case TrackingEventType.AtDestination:
                    driver.ArriveStop(e);
                    break;

                case TrackingEventType.LeaveDestination:
                    driver.DepartStop(e);
                    break;

                case TrackingEventType.InTransit:
                    driver.ReturnToHub(e);
                    break;

                case TrackingEventType.ArriveHub:
                    driver.ArriveHub(e);
                    break;

                case TrackingEventType.Close:
                    driver.Close(e);
                    break;
                }
            }
        }