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