Пример #1
0
        public Query(IUserService userService, IAvailabilityService availabilityService, UserByIdDataLoader userLoader, IHttpContextAccessor context)
        {
            Field <UserType, User>().Name("user").Argument <NonNullGraphType <StringGraphType> >("id").ResolveAsync(
                x => userLoader.LoadAsync(x.GetArgument <string>("id"))).Authorize();

            FieldAsync <UserType, User>("userByLogin",
                                        arguments: new QueryArguments(new QueryArgument <NonNullGraphType <StringGraphType> > {
                Name = "login"
            }),
                                        resolve: x => userService.FindByLogin(x.GetArgument <string>("login"))).Authorize();

            FieldAsync <UserType, User>("userByEmail",
                                        arguments: new QueryArguments(new QueryArgument <NonNullGraphType <StringGraphType> > {
                Name = "email"
            }),
                                        resolve: x => userService.FindByEmail(x.GetArgument <string>("email"))).Authorize();

            FieldAsync <NonNullGraphType <UserType>, User>("me",
                                                           resolve: x => userService.FindById(context.GetUserId())).Authorize();

            FieldAsync <NonNullGraphType <AvailabilityResultType>, AvailabilityResponse>("availabilityByUsername",
                                                                                         arguments: new QueryArguments(new QueryArgument <NonNullGraphType <StringGraphType> > {
                Name = "username"
            }),
                                                                                         resolve: x => availabilityService.AvailabilityByLogin(x.GetArgument <string>("username")));

            FieldAsync <NonNullGraphType <AvailabilityResultType>, AvailabilityResponse>("availabilityByEmail",
                                                                                         arguments: new QueryArguments(new QueryArgument <NonNullGraphType <StringGraphType> > {
                Name = "email"
            }),
                                                                                         resolve: x => availabilityService.AvailabilityByEmail(x.GetArgument <string>("email")));
        }
 public ReservationsController(
     IReservationsService reservationsService,
     IAvailabilityService availabilityService)
 {
     _reservationsService = reservationsService;
     _availabilityService = availabilityService;
 }
Пример #3
0
 public BookingService(IAvailabilityDataStorage availabilityDataStorage, IAvailabilityService availabilityService, IDateTimeProvider dateTimeProvider, DirectContractsDbContext dbContext)
 {
     _availabilityDataStorage = availabilityDataStorage;
     _availabilityService     = availabilityService;
     _dateTimeProvider        = dateTimeProvider;
     _dbContext = dbContext;
 }
Пример #4
0
        public VMMainPage(ILocalizationService localizationService, IPhoneCallService phoneCallService, MapItemsModel mapsItemModel, IVibrationService vibrationService, IAvailabilityService availabilityService, IConnectionManager connectionManager)
        {
            _localizationService = localizationService;
            _phoneCallService = phoneCallService;
            _mapsItemModel = mapsItemModel;
            _vibrationService = vibrationService;
            _availabilityService = availabilityService;
            _connectionManager = connectionManager;

            _dispatcherTimerChronometer = new DispatcherTimer { Interval = new TimeSpan(0, 0, 0, 1) };
            _dispatcherTimerChronometer.Tick += _dispatcherTimer_Tick;

            var dispatcherTimerAvailability = new DispatcherTimer()
            {
                Interval = new TimeSpan(0, 0, 0, 30)
            };
            dispatcherTimerAvailability.Tick += _dispatcherTimerAvailability_Tick;
            dispatcherTimerAvailability.Start();

            _mapsItemModel.GetNearMapItemsCompleted += GetNearMapItemsCompleted;

            _localizationService.Geolocator.PositionChanged += _geolocator_PositionChanged;

            SetCurrentPositionAsync();
            ZoomLevel = 15;

            _lazyPhoneCallCommand = new Lazy<DelegateCommand>(() => new DelegateCommand(PhoneCallCommandExecute));

            _lazyGetNearStationsCommand = new Lazy<DelegateCommand>(() => new DelegateCommand(GetNearStationsCommandExecute));

            _lazyStartChronometerCommand = new Lazy<DelegateCommand>(() => new DelegateCommand(StartChronometerCommandExecute));
        }
 public HomeController(IAvailabilityService availabilityService, IBookingAndAccountsService bookingAndAccountsService,
     IProxyService proxyService)
 {
     _availabilityService = availabilityService;
     _bookingAndAccountsService = bookingAndAccountsService;
     _proxyService = proxyService;
 }
 public BookingController(IBookingService bookingService, IAvailabilityService availabilityService,
                          ChannelFactory <IAdvancedOrderService> channelFactory, IConfiguration configuration)
 {
     _bookingService       = bookingService;
     _availabilityService  = availabilityService;
     _advancedOrderService = channelFactory.CreateChannel();
     _configuration        = configuration;
 }
 /// <summary>
 ///     Allows for injection of IAvailabilityService and IFlightService
 /// </summary>
 /// <param name="availabilityService">Instance of IAvailabilityService implementation</param>
 /// <param name="flightService">Instance of IFlightService implementation</param>
 public FlightsController(
     IAvailabilityService availabilityService,
     IFlightService flightService
     )
 {
     _availabilityService = availabilityService;
     _flightService       = flightService;
 }
Пример #8
0
 public BookingService(BookingContext context, IWorkingDayService workingDayService, IEmailService emailService, IAvailabilityService availabilityService, IConfiguration configuration, ILogger <BookingService> logger)
 {
     _context             = context;
     _workingDayService   = workingDayService;
     _emailService        = emailService;
     _availabilityService = availabilityService;
     _configuration       = configuration;
     _logger = logger;
 }
 public SelectAvailabilityViewModel(
     IMvxLogProvider logProvider,
     IMvxNavigationService navigationService, IAvailabilityService availabilityService) : base(logProvider,
                                                                                               navigationService)
 {
     _availabilityService = availabilityService;
     //_availability = new ValidatableObject<ObservableCollection<Availability>>();
     //_availability.Value = new ObservableCollection<Availability>();
 }
 public ReservationsService(
     FoodFusionContext dbContext,
     IMapper mapper,
     IConcurrentEventsService <ReservationDetailedModel> concurrentEventsService,
     IAvailabilityService availabilityService)
 {
     _dbContext           = dbContext;
     _mapper              = mapper;
     _availabilityService = availabilityService;
 }
 public AvailabilitiesController(ApplicationDbContext context,
                                 IAvailabilityService availabilityService,
                                 IFreelancerService freelancerService,
                                 IProjectService projectService,
                                 IMapper mapper)
 {
     _context = context;
     this._availabilityService = availabilityService;
     this._freelancerService   = freelancerService;
     this._projectService      = projectService;
     this._mapper = mapper;
 }
Пример #12
0
 public AvailabilityController(
     ILogger <AvailabilityController> logger,
     IAvailabilityService availabilityService,
     IShiftService shiftService,
     ITaskService taskService,
     IPersonService personService)
 {
     this.logger = logger;
     this.availabilityService = availabilityService;
     this.shiftService        = shiftService;
     this.taskService         = taskService;
     this.personService       = personService;
 }
 public ParticipationsController(
     ILogger <ParticipationsController> logger,
     IParticipationService participationService,
     IAvailabilityService availabilityService,
     IPersonService personService,
     IOptions <WebUrlConfig> options
     )
 {
     this.logger = logger;
     this.participationService = participationService;
     this.availabilityService  = availabilityService;
     this.personService        = personService;
     webUrlConfig = options.Value;
 }
Пример #14
0
        public AvailabilityServiceTests()
        {
            // Setup database mocks
            _dbMock     = new Mock <FestispecContext>();
            _modelMocks = new ModelMocks();

            _dbMock.Setup(x => x.Employees).Returns(MockHelpers.CreateDbSetMock(_modelMocks.Employees).Object);

            _dbMock.Setup(x => x.Availabilities).Returns(MockHelpers.CreateDbSetMock(_modelMocks.Availabilities).Object);

            _dbMock.Setup(x => x.PlannedEvents).Returns(MockHelpers.CreateDbSetMock(_modelMocks.PlannedEvents).Object);

            _dbMock.Setup(m => m.SaveChangesAsync()).ReturnsAsync(1);

            _availabilityService = new AvailabilityService(_dbMock.Object);
        }
Пример #15
0
        public ShiftController(
            ILogger <ShiftController> logger,
            IShiftService shiftService,
            IProjectService projectService,
            ITaskService taskService,
            IPersonService personService,
            IAvailabilityService availabilityService,
            string b2CExtentionApplicationId)

        {
            this.logger                    = logger;
            this.shiftService              = shiftService;
            this.projectService            = projectService;
            this.personService             = personService;
            this.taskService               = taskService;
            this.availabilityService       = availabilityService;
            this.b2CExtentionApplicationId = b2CExtentionApplicationId;
        }
Пример #16
0
 public IntentService(IHotelService hotelService, IAvailabilityService availabilityService)
 {
     _hotelService        = hotelService;
     _availabilityService = availabilityService;
 }
Пример #17
0
 public AvailabilitiesController(IAvailabilityService availabilityService)
 {
     _service = availabilityService;
 }
 public HomeController(ILogger <HomeController> logger, IAvailabilityService availabilityService)
 {
     _logger = logger;
     _availabilityService = availabilityService;
 }
Пример #19
0
 public InterviewController()
 {
     Service   = new InterviewService();
     ServiceAv = new AvailabilityService();
 }
Пример #20
0
 public AccommodationsController(IAvailabilityService availabilityService, IAccommodationDataService accommodationDataService)
 {
     _availabilityService      = availabilityService;
     _accommodationDataService = accommodationDataService;
 }
Пример #21
0
 public StatusController(IStatusRepository statusRepository, IAvailabilityService availabilityService)
 {
     _statusRepository    = statusRepository;
     _availabilityService = availabilityService;
 }
Пример #22
0
 public AvailabilityController(Club club, IAvailabilityQuery availabilityQuery, IAvailabilityService availabilityService)
 {
     this.club = club;
     this.availabilityQuery   = availabilityQuery;
     this.availabilityService = availabilityService;
 }
Пример #23
0
 public AvailabilityFilter(IAvailabilityService availabilityService)
 {
     this.availabilityService = availabilityService;
     Order = 10;
 }
Пример #24
0
 public ProviderAvailavilitiesController(IProviderService providerService, IAvailabilityService availabilityService, IMapper mapper)
 {
     _availabilityService = availabilityService;
     _providerService     = providerService;
     _mapper = mapper;
 }
 public AvailabilityController()
 {
     Service = new AvailabilityService();
 }
Пример #26
0
 public AvailabilityController(IAvailabilityService availabilityService)
 {
     _availabilityService = availabilityService;
 }
Пример #27
0
 public Scheduler(IAvailabilityService availabilityService)
 {
     _availabilityService = availabilityService;
 }
Пример #28
0
        public StatusControllerTest()
        {
            _statusRepositoryMock = new Mock <IStatusRepository>();

            _sut = new AvailabilityService(_statusRepositoryMock.Object);
        }
Пример #29
0
 public AvailabilityProcessor(IAvailabilityRecordRepository availabilityRecordRepository,
                              IAvailabilityService availabilityService)
 {
     _availabilityRecordRepository = availabilityRecordRepository;
     _availabilityService          = availabilityService;
 }