Exemple #1
0
        public Voyage(VoyageNumber voyageNumber, Schedule schedule)
        {
            Validate.NotNull(voyageNumber, "Voyage number is required");
            Validate.NotNull(schedule, "Schedule is required");

            this.voyageNumber = voyageNumber;
            this.schedule     = schedule;
        }
Exemple #2
0
            public Builder(VoyageNumber voyageNumber, Location departureLocation)
            {
                Validate.NotNull(voyageNumber, "Voyage number is required");
                Validate.NotNull(departureLocation, "Departure location is required");

                this.voyageNumber      = voyageNumber;
                this.departureLocation = departureLocation;
            }
        public static Voyage Lookup(VoyageNumber voyageNumber)
        {
            if (!ALL.ContainsKey(voyageNumber))
            {
                return(null);
            }

            return(ALL[voyageNumber]);
        }
Exemple #4
0
 public virtual bool SameIdentityAs(Voyage other)
 {
     return(other != null && VoyageNumber.SameValueAs(other.VoyageNumber));
 }