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); }
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())); }
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)); }
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)); }