コード例 #1
0
        public void CancelReservation(ReservationCode code)
        {
            if (!_reservation.IsValidReservation(code))
            {
                throw new ArgumentException($"Reservation is not found with '{code}'");
            }

            _reservation.CancelReservation(code);
        }
コード例 #2
0
        public void TakeAnOrder(ReservationCode code, List <string> dishes, List <string> beverages)
        {
            foreach (var dish in dishes)
            {
                _reservation.AddDishForReservation(code, dish);
            }

            foreach (var beverage in beverages)
            {
                _reservation.AddBeverageForReservation(code, beverage);
            }
        }
コード例 #3
0
 public string FindTableLocation(ReservationCode code)
 {
     return(_reservation.FindTable(code));
 }