/// <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; }
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); }
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; }