Ejemplo n.º 1
0
        public void SelectHotel(string hotelName)
        {
            HotelInfo     hotel = this.hotelSelector.SelectHotel(this.destinationTown, hotelName);
            IVacationPart part  =
                this.hotelService.MakeBooking(hotel, this.arrivalDate, this.DepartureDate);

            this.parts.Add(part);
        }
Ejemplo n.º 2
0
 public IVacationPart MakeBooking(HotelInfo hotel, DateTime checkin,
                                  DateTime checkout)
 {
     Console.WriteLine("Waiting for remote hotel booking service to respond...");
     System.Threading.Thread.Sleep(300); // Waiting for remote service
     Console.WriteLine("Booking hotel {0} {1:dd-MMM-yyyy} - {2:dd-MMMM-yyyy}\n",
                       hotel, checkin, checkout);
     return(new DummyVacationPart("Hotel " + hotel.ToString()));
 }
Ejemplo n.º 3
0
        public IVacationPart CreateHotelReservation(string town, string hotelName, DateTime arrivalDate, DateTime leaveDate)
        {
            Console.WriteLine("Looking up hotel " + hotelName + " in " + town);

            HotelInfo hotel = this.hotelSelector.SelectHotel(town, hotelName);

            Console.WriteLine("Waiting for remote hotel booking service to respond...");

            return(this.hotelService.MakeBooking(hotel, arrivalDate, leaveDate));
        }
Ejemplo n.º 4
0
 public Hotel(HotelInfo hotelInfo)
 {
     this.hotelInfo = hotelInfo;
 }
        public IVacationPart CreateHotelReservation(string town, string hotelName, DateTime arrivalDate, DateTime leaveDate)
        {
            HotelInfo hotel = this.hotelSelector.SelectHotel(town, hotelName);

            return(this.hotelService.MakeBooking(hotel, arrivalDate, leaveDate));
        }