예제 #1
0
 /// <summary>
 /// Creates new event.
 /// </summary>
 /// <param name="eventType"></param>
 /// <param name="location"></param>
 /// <param name="registrationDate"></param>
 /// <param name="completionDate"></param>
 public HandlingEvent(HandlingEventType eventType, DomainModel.Potential.Location.Location location, DateTime registrationDate, DateTime completionDate)
 {
     _eventType        = eventType;
     _completionDate   = completionDate;
     _registrationDate = registrationDate;
     _location         = location;
 }
예제 #2
0
 /// <summary>
 /// Creates new event.
 /// </summary>
 /// <param name="eventType"></param>
 /// <param name="location"></param>
 /// <param name="registrationDate"></param>
 /// <param name="completionDate"></param>
 public HandlingEvent(HandlingEventType eventType, DomainModel.Potential.Location.Location location, DateTime registrationDate, DateTime completionDate)
 {
    _eventType = eventType;         
    _completionDate = completionDate;
    _registrationDate = registrationDate;
    _location = location;
 }
 public HandlingActivity(HandlingEventType eventType, DomainModel.Potential.Location.Location location)
 {
    if (location == null)
    {
       throw new ArgumentNullException("location");
    }
    _eventType = eventType;
    _location = location;
 }
예제 #4
0
 public HandlingActivity(HandlingEventType eventType, DomainModel.Potential.Location.Location location)
 {
    if (location == null)
    {
       throw new ArgumentNullException("location");
    }
    _eventType = eventType;
    _location = location;
 }
예제 #5
0
        private Delivery(HandlingEvent lastHandlingEvent, Itinerary itinerary, RouteSpecification specification)
        {
            _calculatedAt = DateTime.Now;
            _lastEvent    = lastHandlingEvent;

            _misdirected       = CalculateMisdirectionStatus(itinerary);
            _routingStatus     = CalculateRoutingStatus(itinerary, specification);
            _transportStatus   = CalculateTransportStatus();
            _lastKnownLocation = CalculateLastKnownLocation();
            _eta = CalculateEta(itinerary);
            _nextExpectedActivity    = CalculateNextExpectedActivity(specification, itinerary);
            _isUnloadedAtDestination = CalculateUnloadedAtDestination(specification);
        }
예제 #6
0
      public RouteSpecification(DomainModel.Potential.Location.Location origin, DomainModel.Potential.Location.Location destination, DateTime arrivalDeadline)
      {
         if (origin == null)
         {
            throw new ArgumentNullException("origin");
         }
         if (destination == null)
         {
            throw new ArgumentNullException("destination");
         }
         if (origin == destination)
         {
            throw new ArgumentException("Origin and destination can't be the same.");
         }

         _origin = origin;
         _arrivalDeadline = arrivalDeadline;
         _destination = destination;
      }
예제 #7
0
        public RouteSpecification(DomainModel.Potential.Location.Location origin, DomainModel.Potential.Location.Location destination, DateTime arrivalDeadline)
        {
            if (origin == null)
            {
                throw new ArgumentNullException("origin");
            }
            if (destination == null)
            {
                throw new ArgumentNullException("destination");
            }
            if (origin == destination)
            {
                throw new ArgumentException("Origin and destination can't be the same.");
            }

            _origin          = origin;
            _arrivalDeadline = arrivalDeadline;
            _destination     = destination;
        }
예제 #8
0
      private Delivery(HandlingEvent lastHandlingEvent, Itinerary itinerary, RouteSpecification specification)
      {
         _calculatedAt = DateTime.Now;
         _lastEvent = lastHandlingEvent;

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