Beispiel #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;
        }
Beispiel #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;
            }
Beispiel #3
0
        public static Voyage Lookup(VoyageNumber voyageNumber)
        {
            if (!ALL.ContainsKey(voyageNumber))
            {
                return(null);
            }

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