コード例 #1
0
 public HotelController(IHotelsService hotelsService, IUserService userService)
 {
     Guard.WhenArgument(hotelsService, "hotelsService").IsNull().Throw();
     Guard.WhenArgument(userService, "userService").IsNull().Throw();
     this.hotelsService = hotelsService;
     this.userService   = userService;
 }
コード例 #2
0
 public DetailsController(
     IHotelsService hotelsService,
     IHotelRoomsService hotelRoomsService)
 {
     this.hotels     = hotelsService;
     this.hotelRooms = hotelRoomsService;
 }
コード例 #3
0
 public DetailsController(
     IHotelsService hotelsService,
     IHotelRoomsService hotelRoomsService)
 {
     this.hotels = hotelsService;
     this.hotelRooms = hotelRoomsService;
 }
コード例 #4
0
 public HomeController(IDestinationsService destinationsService, IUsersService usersService, IReservationsService reservationService, UserManager <ApplicationUser> userManager, IHotelsService hotelsService)
 {
     this.destinationsService = destinationsService;
     this.usersService        = usersService;
     this.reservationService  = reservationService;
     this.userManager         = userManager;
     this.hotelsService       = hotelsService;
 }
コード例 #5
0
 public TripsController(IMonumentsService monumentsService,
                        IHotelsService hotelsService,
                        ITripsService tripsService,
                        IMapper mapper)
 {
     this.monumentsService = monumentsService;
     this.hotelsService    = hotelsService;
     this.tripsService     = tripsService;
     this.mapper           = mapper;
 }
コード例 #6
0
 public HotelReviewsService(MbDbContext dbContext,
                            IMapper mapper,
                            IUsersService usersService,
                            IHotelsService hotelsService)
 {
     this.dbContext     = dbContext;
     this.mapper        = mapper;
     this.usersService  = usersService;
     this.hotelsService = hotelsService;
 }
コード例 #7
0
 public ReservationController(
     IReservationService reservationService,
     IUserService userService,
     IHotelsService hotelService
     )
 {
     this.reservationService = reservationService;
     this.hotelService       = hotelService;
     this.userService        = userService;
 }
コード例 #8
0
 public RoomsController(
     IRoomsService roomsServices,
     IPeriodsService periodsServices,
     IReservationsService reservationsServices,
     IHotelsService hotelsService,
     UserManager <BookingUser> userManager)
 {
     this.roomsServices        = roomsServices;
     this.periodsServices      = periodsServices;
     this.reservationsServices = reservationsServices;
     this.hotelsService        = hotelsService;
     this.userManager          = userManager;
 }
コード例 #9
0
 public HotelsController(
     IHotelsService hotelsService,
     IHotelReviewsService hotelReviewsService,
     IHotelCommentsService hotelCommentsService,
     IOblastsService oblastsService,
     IMapper mapper)
 {
     this.hotelsService        = hotelsService;
     this.hotelReviewsService  = hotelReviewsService;
     this.hotelCommentsService = hotelCommentsService;
     this.oblastsService       = oblastsService;
     this.mapper = mapper;
 }
コード例 #10
0
 public TripsService(
     MbDbContext dbContext,
     IMapper mapper,
     ImagesUploader imagesUploader,
     IUsersService usersService,
     IMonumentsService monumentsService,
     IHotelsService hotelsService)
 {
     this.dbContext        = dbContext;
     this.mapper           = mapper;
     this.imagesUploader   = imagesUploader;
     this.usersService     = usersService;
     this.monumentsService = monumentsService;
     this.hotelsService    = hotelsService;
 }
コード例 #11
0
 public HotelsController(
     UserManager <ApplicationUser> userManager,
     IHotelsService hotelsService,
     ICitiesService citiesService,
     IStarsService starsService,
     IRoomsService roomsService,
     SignInManager <ApplicationUser> signInManager)
 {
     this.userManager   = userManager;
     this.hotelsService = hotelsService;
     this.citiesService = citiesService;
     this.starsService  = starsService;
     this.roomsService  = roomsService;
     this.signInManager = signInManager;
 }
コード例 #12
0
        public ReservationService(
            IEfRepository <Reservation> reservationRepo,
            IHotelsService hotelsService,
            IUserService userService,
            //IEfRepository<Reservation> countriesRepo,
            ISaveContext context
            )
        {
            Guard.WhenArgument(reservationRepo, "reservationRepo").IsNull().Throw();
            Guard.WhenArgument(hotelsService, "hotelsService").IsNull().Throw();
            Guard.WhenArgument(userService, "userService").IsNull().Throw();
            //Guard.WhenArgument(countriesRepo, "countriesRepo").IsNull().Throw();
            Guard.WhenArgument(context, "context").IsNull().Throw();

            this.reservationRepo = reservationRepo;
            this.userService     = userService;
            this.hotelsService   = hotelsService;
            this.context         = context;
        }
コード例 #13
0
        public HotelsServiceTests()
        {
            var services = new ServiceCollection();

            services.AddDbContext <MbDbContext>(opt =>
                                                opt.UseInMemoryDatabase(Guid.NewGuid().ToString()));
            services.AddScoped <IHotelsService, HotelsService>();
            services.AddScoped <IOblastsService, OblastsService>();

            Mapper.Reset();
            Mapper.Initialize(config => config.AddProfile(typeof(HotelsProfile)));
            services.AddScoped <IMapper>(service => Mapper.Instance);

            var account = new Account(GlobalConstants.CloudinaryName,
                                      GlobalConstants.CloudinaryKey, GlobalConstants.CloudinarySecret);

            services.AddScoped(x => new Cloudinary(account));
            services.AddScoped <ImagesUploader>();

            this.provider      = services.BuildServiceProvider();
            this.dbContext     = this.provider.GetService <MbDbContext>();
            this.hotelsService = this.provider.GetService <IHotelsService>();
        }
コード例 #14
0
 public GuestController(IHotelsService service)
 {
     this.TempServiceHotels = service;
 }
コード例 #15
0
 public OrganizedTripsController(IOrganizedTripsService tripsService, IHotelsService hotelsService, IDestinationsService destinationsService)
 {
     this.tripsService        = tripsService;
     this.hotelsService       = hotelsService;
     this.destinationsService = destinationsService;
 }
コード例 #16
0
 public VacationBookingCoordinator()
 {
     _carsService    = RestClient.For <ICarsService>("http://localhost:5001");
     _hotelsService  = RestClient.For <IHotelsService>("http://localhost:5003");
     _flightsService = RestClient.For <IFlightsService>("http://localhost:5002");
 }
コード例 #17
0
 public AvailableController(IHotelsService hotelsService, IHotelRoomsService hotelRoomsService)
 {
     this.hotels     = hotelsService;
     this.hotelRooms = hotelRoomsService;
 }
コード例 #18
0
 public HomeController(ISpecialOffersService specialOffersService, IHotelsService hotelsService)
 {
     this.specialOffersService = specialOffersService;
     this.hotelsService        = hotelsService;
 }
コード例 #19
0
 public HotelsController(IHotelsService hotelsService)
 {
     this.hotels = hotelsService;
 }
コード例 #20
0
 public HotelsController(IHotelsService hotelsServices, IRoomsService roomsService)
 {
     this.hotelsServices = hotelsServices;
     this.roomsService   = roomsService;
 }
コード例 #21
0
 public HotelsController(IHotelsService hotelsServices)
 {
     this.hotelsServices = hotelsServices;
 }
コード例 #22
0
 public AvailableController(IHotelsService hotelsService, IHotelRoomsService hotelRoomsService)
 {
     this.hotels = hotelsService;
     this.hotelRooms = hotelRoomsService;
 }
コード例 #23
0
 public HotelsController(IDestinationsService destinationsService, IHotelsService hotelsService)
 {
     this.destinationsService = destinationsService;
     this.hotelsService       = hotelsService;
 }
コード例 #24
0
 public HotelCommentsService(MbDbContext dbContext, IUsersService usersService, IHotelsService hotelsService)
 {
     this.dbContext     = dbContext;
     this.usersService  = usersService;
     this.hotelsService = hotelsService;
 }
コード例 #25
0
 public HotelController(IHotelsService hotelsService, IMapper mapper)
 {
     _hotelsService = hotelsService;
     _mapper        = mapper;
 }
コード例 #26
0
 public AllController(IHotelsService hotelsService)
 {
     this.hotels = hotelsService;
 }
コード例 #27
0
 public HotelsController(IHotelsService hotelsService)
 {
     this.hotelsService = hotelsService;
 }
コード例 #28
0
 public HotelReviewsController(IHotelReviewsService hotelReviewsService, IHotelsService hotelsService)
 {
     this.hotelReviewsService = hotelReviewsService;
     this.hotelsService       = hotelsService;
 }