Esempio n. 1
0
		public Event (IUser user, ICargo cargo, EventType type, DateTime completionDate)
		{
			if(null == user)
				throw new ArgumentNullException("user");
			if(null == cargo)
				throw new ArgumentNullException("cargo");
			
			_user = user.Username;
			_completionDate = completionDate;
			_cargo = cargo.TrackingId;
			_location = cargo.Delivery.LastKnownLocation;
			_voyage = cargo.Delivery.CurrentVoyage;
			_type = type;
		}
Esempio n. 2
0
        public Event(IUser user, ICargo cargo, EventType type, DateTime completionDate)
        {
            if (null == user)
            {
                throw new ArgumentNullException("user");
            }
            if (null == cargo)
            {
                throw new ArgumentNullException("cargo");
            }

            _user           = user.Username;
            _completionDate = completionDate;
            _cargo          = cargo.TrackingId;
            _location       = cargo.Delivery.LastKnownLocation;
            _voyage         = cargo.Delivery.CurrentVoyage;
            _type           = type;
        }