Пример #1
0
        private Delivery(HandlingEvent lastHandlingEvent, Itinerary itinerary, RouteSpecification specification)
        {
            _calculatedAt = DateTime.Now;
            _lastEvent    = lastHandlingEvent;

            _isMisdirected           = CalculateMisdirectionStatus(itinerary);
            _routingStatus           = CalculateRoutingStatus(itinerary, specification);
            _transportStatus         = CalculateTransportStatus();
            _lastKnownLocation       = CalculateLastKnownLocation();
            _estimatedTimeOfArrival  = CalculateEta(itinerary);
            _nextExpectedActivity    = CalculateNextExpectedActivity(specification, itinerary);
            _isUnloadedAtDestination = CalculateUnloadedAtDestination(specification);
        }
Пример #2
0
        private Delivery(HandlingEvent lastHandlingEvent, Itinerary itinerary, RouteSpecification specification)
        {
            _calculatedAt = DateTime.Now;
            _lastEvent = lastHandlingEvent;

            _misdirected = CalculateMisdirectionStatus(LastEvent, itinerary);
            _routingStatus = CalculateRoutingStatus(itinerary, specification);
            _transportStatus = CalculateTransportStatus(LastEvent);
            _lastKnownLocation = CalculateLastKnownLocation(LastEvent);
            _eta = CalculateEta(itinerary);
            _nextExpectedActivity = CalculateNextExpectedActivity(LastEvent, specification, itinerary);
            _isUnloadedAtDestination = CalculateUnloadedAtDestination(LastEvent, specification);
        }