Exemple #1
0
        public Guid CheckIn(int weight)
        {
            //Consider refactoring towards IServiceClassValidator[]
            ValidateCount();
            ValidateWeight(weight);

            var bagFlightGuid = Guid.NewGuid();
            var bag           = new PassengerBag(PassengerId, bagFlightGuid, weight);

            baggage.Add(bag);

            return(bag.Guid);
        }
Exemple #2
0
 public CargoItem(PassengerBag bag)
 {
     Guid   = bag.Guid;
     Weight = bag.Weight;
 }