コード例 #1
0
        static void Main(string[] args)
        {
            ChannelFactory <IHotelBookingService> serviceFactory =
                new ChannelFactory <IHotelBookingService>
                    (new BasicHttpBinding(),
                    "http://localhost:8733/HotelBooking/HotelBookingHttp");

            IHotelBookingService proxy = serviceFactory.CreateChannel();

            Reservation reservation = new Reservation();

            reservation.HotelName = "HoteYA";

            reservation.GuestName = "John";

            reservation.NumberOfDays = 3;

            reservation.CheckinDate = DateTime.Now;

            BookingResponse response = proxy.BookHotel(reservation);

            Console.WriteLine
                ("Booking response: {0}, booking reference: {1}",
                response.IsApproved ? "Approved" : "Declined",
                response.BookingReference);

            Console.ReadLine();
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PackageController" /> class.
 /// </summary>
 /// <param name="configuration">Configuration</param>
 /// <param name="mapper">The mapper.</param>
 /// <param name="packageService">The package service.</param>
 /// <param name="packageImageService">The package image service.</param>
 /// <param name="masterService">The master service.</param>
 /// <param name="environment">The environment.</param>
 /// <param name="hotelBookingService">The hotel booking service.</param>
 /// <param name="hostingEnvironment">The hosting environment.</param>
 public PackageController(IConfiguration configuration, IMapper mapper, IPackageService packageService, IPackageImageService packageImageService, IMasterService masterService, IHostingEnvironment environment, IHotelBookingService hotelBookingService, IHostingEnvironment hostingEnvironment)
     : base(mapper, configuration)
 {
     this.packageService      = packageService;
     this.packageImageService = packageImageService;
     this.masterService       = masterService;
     this.environment         = environment;
     this.hotelBookingService = hotelBookingService;
     this.hostingEnvironment  = hostingEnvironment;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AccountController" /> class.
 /// </summary>
 /// <param name="homePageService">Home Page Service</param>
 /// <param name="stateService">State Service</param>
 /// <param name="configuration">Configuration</param>
 /// <param name="countryService">The Country Service.</param>
 /// <param name="cityService">The City Service.</param>
 /// <param name="mapper">The mapper.</param>
 /// <param name="userDetailService">The user detail service.</param>
 /// <param name="masterService">The master service.</param>
 /// <param name="serviceProvider">The service provider.</param>
 /// <param name="applicationUserService">The application user service.</param>
 /// <param name="hotelBookingService">The hotel booking service.</param>
 /// <param name="flightBookingService">The flight booking service.</param>
 public AccountController(IHomePageService homePageService, IStateService stateService, IConfiguration configuration, ICountryService countryService, ICityService cityService, IMapper mapper, IUserDetailService userDetailService, IMasterService masterService, IServiceProvider serviceProvider, IApplicationUserService applicationUserService, IHotelBookingService hotelBookingService, IFlightBookingService flightBookingService)
     : base(mapper, homePageService, cityService, countryService, configuration, stateService)
 {
     this.configuration          = configuration;
     this.cityService            = cityService;
     this.countryService         = countryService;
     this.userDetailService      = userDetailService;
     this.masterService          = masterService;
     this.serviceProvider        = serviceProvider;
     this.applicationUserService = applicationUserService;
     this.hotelBookingService    = hotelBookingService;
     this.flightBookingService   = flightBookingService;
 }
        static void Main(string[] args)
        {
            IHotelBookingService proxy = null; // TODO channel Factory

            Reservation reservation = new Reservation
            {
                HotelName    = "HotelA",
                GuestName    = "John",
                NumberOfDays = 3,
                CheckinDate  = DateTime.Now
            };

            BookingResponse response = proxy.BookHotel(reservation);

            Console.WriteLine
                ("Booking response: {0}, booking reference: {1}",
                response.IsApproved ? "Approved" : "Declined",
                response.BookingReference);

            Console.ReadLine();
        }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DashboardController" /> class.
 /// </summary>
 /// <param name="configuration">Configuration</param>
 /// <param name="mapper">The mapper.</param>
 /// <param name="hotelbooking">The hotelbooking.</param>
 /// <param name="userDetail">The user detail.</param>
 public DashboardController(IConfiguration configuration, IMapper mapper, IHotelBookingService hotelbooking, IUserDetailService userDetail)
     : base(mapper, configuration)
 {
     this.hotelbooking = hotelbooking;
     this.userDetail   = userDetail;
 }
コード例 #6
0
 public HotelsBookingController(IHotelBookingService service)
 => _service = service;
コード例 #7
0
 public ProfileController(IUsersService usersService, IHotelBookingService hotelBookingService, IHotelContent HotelContent)
 {
     this.usersService        = usersService;
     this.hotelBookingService = hotelBookingService;
     this.HotelContent        = HotelContent;
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReportController" /> class.
 /// </summary>
 /// <param name="configuration">Configuration</param>
 /// <param name="mapper">The mapper.</param>
 /// <param name="user">The user.</param>
 /// <param name="hotelbooking">The hotelbooking.</param>
 public ReportController(IConfiguration configuration, IMapper mapper, IUserDetailService user, IHotelBookingService hotelbooking)
     : base(mapper, configuration)
 {
     this.user         = user;
     this.hotelbooking = hotelbooking;
 }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController" /> class.
 /// </summary>
 /// <param name="tableCacheHandler">to store result in blob cache</param>
 /// <param name="homePageBusiness">Cache Data from storage</param>
 /// <param name="stateService">State Service</param>
 /// <param name="configuration">Web Config</param>
 /// <param name="homePageService">Home Page Service</param>
 /// <param name="countryService">The Country Service.</param>
 /// <param name="cityService">The City Service.</param>
 /// <param name="listingService">Listing Service</param>
 /// <param name="blogService">Blog Service</param>
 /// <param name="curationService">Curation Service</param>
 /// <param name="mapper">The mapper.</param>
 /// <param name="masterService">The master service.</param>
 /// <param name="domainSetting">The domain setting.</param>
 /// <param name="hostingEnvironment">The hosting environment.</param>
 /// <param name="viewRenderService">The view render service.</param>
 /// <param name="userDetailService">The user detail service.</param>
 /// <param name="package">The package.</param>
 /// <param name="hotelBookingService">The hotel booking service.</param>
 /// <param name="homeBanner">The home banner.</param>
 /// <param name="dealService">Deal Service</param>
 public HomeController(ITableCacheHandler tableCacheHandler, IHomePageBusiness homePageBusiness, IStateService stateService, IConfiguration configuration, IHomePageService homePageService, ICountryService countryService, ICityService cityService, IListingService listingService, IBlogService blogService, ICurationsService curationService, IMapper mapper, IMasterService masterService, IOptions <DomainSetting> domainSetting, IHostingEnvironment hostingEnvironment, IViewRenderService viewRenderService, IUserDetailService userDetailService, IPackageService package, IHotelBookingService hotelBookingService, IHomeBannerService homeBanner, IDealService dealService)
     : base(mapper, homePageService, cityService, countryService, configuration, stateService)
 {
     this.tableCacheHandler  = tableCacheHandler;
     this.homePageBusiness   = homePageBusiness;
     this.homePageService    = homePageService;
     this.listingService     = listingService;
     this.package            = package;
     this.hostingEnvironment = hostingEnvironment;
     this.viewRenderService  = viewRenderService;
     this.domainSetting      = domainSetting.Value;
     this.masterService      = masterService;
     this.dealService        = dealService;
 }