Beispiel #1
0
 public ProviderApprenticeshipsController(
     ISqlQueryDispatcher sqlQueryDispatcher,
     IProviderContextProvider providerContextProvider)
 {
     _sqlQueryDispatcher      = sqlQueryDispatcher;
     _providerContextProvider = providerContextProvider;
 }
Beispiel #2
0
 public Handler(
     ISqlQueryDispatcher sqlQueryDispatcher,
     IProviderContextProvider providerContextProvider)
 {
     _sqlQueryDispatcher      = sqlQueryDispatcher;
     _providerContextProvider = providerContextProvider;
 }
 public Handler(
     IProviderContextProvider providerContextProvider,
     IFileUploadProcessor fileUploadProcessor)
 {
     _providerContextProvider = providerContextProvider;
     _fileUploadProcessor     = fileUploadProcessor;
 }
        public CopyCourseRunController(
            ILogger <CopyCourseRunController> logger,
            IOptions <CourseServiceSettings> courseSearchSettings,
            HtmlEncoder htmlEncoder,
            ICourseService courseService,
            ICosmosDbQueryDispatcher cosmosDbQueryDispatcher,
            IProviderContextProvider providerContextProvider)
        {
            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            if (courseSearchSettings == null)
            {
                throw new ArgumentNullException(nameof(courseSearchSettings));
            }

            if (courseService == null)
            {
                throw new ArgumentNullException(nameof(courseService));
            }

            _logger                  = logger;
            _htmlEncoder             = htmlEncoder;
            _courseService           = courseService;
            _cosmosDbQueryDispatcher = cosmosDbQueryDispatcher;
            _providerContextProvider = providerContextProvider;
        }
Beispiel #5
0
        public CopyCourseRunController(
            ILogger <CopyCourseRunController> logger,
            ICourseService courseService,
            ISqlQueryDispatcher sqlQueryDispatcher,
            IProviderContextProvider providerContextProvider,
            ICurrentUserProvider currentUserProvider,
            IClock clock,
            IRegionCache regionCache)
        {
            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            if (courseService == null)
            {
                throw new ArgumentNullException(nameof(courseService));
            }

            _logger                  = logger;
            _courseService           = courseService;
            _sqlQueryDispatcher      = sqlQueryDispatcher;
            _providerContextProvider = providerContextProvider;
            _currentUserProvider     = currentUserProvider;
            _clock       = clock;
            _regionCache = regionCache;
        }
Beispiel #6
0
 public ApprenticeshipsDataManagementHub(
     IProviderContextProvider providerContextProvider,
     IFileUploadProcessor fileUploadProcessor)
 {
     _providerContextProvider = providerContextProvider;
     _fileUploadProcessor     = fileUploadProcessor;
 }
Beispiel #7
0
 public CoursesDataManagementHub(
     IProviderContextProvider providerContextProvider,
     IFileUploadProcessor fileUploadProcessor)
 {
     _providerContextProvider = providerContextProvider;
     _fileUploadProcessor     = fileUploadProcessor;
 }
Beispiel #8
0
 public AddVenueController(
     IMediator mediator,
     JourneyInstanceProvider journeyInstanceProvider,
     IProviderContextProvider providerContextProvider)
 {
     _mediator = mediator;
     _journeyInstanceProvider = journeyInstanceProvider;
     _providerContextProvider = providerContextProvider;
 }
Beispiel #9
0
 public Handler(
     IProviderContextProvider providerContextProvider,
     ISqlQueryDispatcher sqlQueryDispatcher,
     IClock clock)
 {
     _providerContextProvider = providerContextProvider;
     _sqlQueryDispatcher      = sqlQueryDispatcher;
     _clock = clock;
 }
Beispiel #10
0
 public CommandHandler(
     ISqlQueryDispatcher sqlQueryDispatcher,
     IProviderContextProvider providerContextProvider,
     ICurrentUserProvider currentUserProvider)
 {
     _sqlQueryDispatcher      = sqlQueryDispatcher;
     _providerContextProvider = providerContextProvider;
     _currentUserProvider     = currentUserProvider;
 }
 public PublishCoursesController(
     ICourseService courseService,
     ICosmosDbQueryDispatcher cosmosDbQueryDispatcher,
     IProviderContextProvider providerContextProvider)
 {
     _courseService           = courseService ?? throw new ArgumentNullException(nameof(courseService));
     _cosmosDbQueryDispatcher = cosmosDbQueryDispatcher ?? throw new ArgumentNullException(nameof(cosmosDbQueryDispatcher));
     _providerContextProvider = providerContextProvider;
 }
Beispiel #12
0
 public Handler(
     IFileUploadProcessor fileUploadProcessor,
     IProviderContextProvider providerContextProvider,
     ISqlQueryDispatcher sqlQueryDispatcher)
 {
     _fileUploadProcessor     = fileUploadProcessor;
     _providerContextProvider = providerContextProvider;
     _sqlQueryDispatcher      = sqlQueryDispatcher;
 }
Beispiel #13
0
 public EditProviderTypeController(
     IMediator mediator,
     ICurrentUserProvider currentUserProvider,
     IProviderContextProvider providerContextProvider)
 {
     _mediator            = mediator;
     _currentUserProvider = currentUserProvider;
     _providerContext     = providerContextProvider.GetProviderContext();
 }
Beispiel #14
0
 public Handler(
     IProviderContextProvider providerContextProvider,
     IFileUploadProcessor fileUploadProcessor,
     IClock clock)
 {
     _providerContextProvider = providerContextProvider;
     _fileUploadProcessor     = fileUploadProcessor;
     _clock = clock;
 }
Beispiel #15
0
 public QANotificationsViewComponent(
     IProviderContextProvider providerContextProvider,
     ISqlQueryDispatcher sqlQueryDispatcher,
     IProviderInfoCache providerInfoCache)
 {
     _providerContextProvider = providerContextProvider;
     _sqlQueryDispatcher      = sqlQueryDispatcher;
     _providerInfoCache       = providerInfoCache;
 }
Beispiel #16
0
 public VenuesDataManagementController(
     IMediator mediator,
     IProviderContextProvider providerContextProvider,
     JourneyInstanceProvider journeyInstanceProvider)
 {
     _mediator = mediator;
     _providerContextProvider = providerContextProvider;
     _journeyInstanceProvider = journeyInstanceProvider;
 }
Beispiel #17
0
 public Task <IActionResult> Post(
     Guid tLevelId,
     [FromServices] IProviderContextProvider providerContextProvider,
     Command request) =>
 _mediator.SendAndMapResponse(
     request,
     response => response.Match <IActionResult>(
         errors => this.ViewFromErrors(errors),
         vm => RedirectToAction(nameof(Deleted), new { tLevelId })
         .WithProviderContext(providerContextProvider.GetProviderContext())));
 public AddTLevelController(
     JourneyInstanceProvider JourneyInstanceProvider,
     IMediator mediator,
     IProviderContextProvider providerContextProvider)
 {
     _journeyInstanceProvider = JourneyInstanceProvider;
     _mediator        = mediator;
     _journeyInstance = JourneyInstanceProvider.GetInstance <AddTLevelJourneyModel>();
     _providerContext = providerContextProvider.GetProviderContext();
 }
 public EditTLevelController(
     IMediator mediator,
     JourneyInstanceProvider journeyInstanceProvider,
     EditTLevelJourneyModelFactory journeyModelFactory,
     IProviderContextProvider providerContextProvider)
 {
     _mediator = mediator;
     _journeyInstanceProvider = journeyInstanceProvider;
     _journeyModelFactory     = journeyModelFactory;
     _providerContextProvider = providerContextProvider;
 }
Beispiel #20
0
 public Handler(
     IProviderContextProvider providerContextProvider,
     IFileUploadProcessor fileUploadProcessor,
     ICurrentUserProvider currentUserProvider,
     JourneyInstanceProvider journeyInstanceProvider)
 {
     _providerContextProvider = providerContextProvider;
     _fileUploadProcessor     = fileUploadProcessor;
     _currentUserProvider     = currentUserProvider;
     _journeyInstanceProvider = journeyInstanceProvider;
 }
Beispiel #21
0
 public EditVenueController(
     IMediator mediator,
     IProviderContextProvider providerContextProvider,
     JourneyInstanceProvider journeyInstanceProvider,
     EditVenueJourneyModelFactory editVenueJourneyModelFactory)
 {
     _mediator = mediator;
     _providerContextProvider      = providerContextProvider;
     _journeyInstanceProvider      = journeyInstanceProvider;
     _editVenueJourneyModelFactory = editVenueJourneyModelFactory;
 }
Beispiel #22
0
 public Handler(
     IProviderContextProvider providerContextProvider,
     ISqlQueryDispatcher sqlQueryDispatcher,
     IClock clock,
     IRegionCache regionCache)
 {
     _providerContextProvider = providerContextProvider;
     _sqlQueryDispatcher      = sqlQueryDispatcher;
     _clock       = clock;
     _regionCache = regionCache;
 }
Beispiel #23
0
        public async Task <IActionResult> SearchProvider(
            int UKPRN,
            [FromServices] IProviderInfoCache providerInfoCache,
            [FromServices] IProviderContextProvider providerContextProvider)
        {
            var providerInfo = await providerInfoCache.GetProviderInfoForUkprn(UKPRN);

            providerContextProvider.SetProviderContext(new ProviderContext(providerInfo));

            Session.SetInt32("UKPRN", UKPRN);
            return(RedirectToAction("Dashboard", "Provider"));
        }
Beispiel #24
0
 public RequireUserCanAccessCourseBehavior(
     IRequireUserCanAccessCourse <TRequest> descriptor,
     ICurrentUserProvider currentUserProvider,
     IProviderOwnershipCache providerOwnershipCache,
     IProviderContextProvider providerContextProvider,
     IProviderInfoCache providerInfoCache)
 {
     _descriptor              = descriptor;
     _currentUserProvider     = currentUserProvider;
     _providerOwnershipCache  = providerOwnershipCache;
     _providerContextProvider = providerContextProvider;
     _providerInfoCache       = providerInfoCache;
 }
Beispiel #25
0
 public ApprenticeshipsController(
     ICourseService courseService,
     ICosmosDbQueryDispatcher cosmosDbQueryDispatcher,
     IOptions <ApprenticeshipSettings> apprenticeshipSettings,
     IStandardsAndFrameworksCache standardsAndFrameworksCache,
     IProviderContextProvider providerContextProvider)
 {
     _courseService               = courseService ?? throw new ArgumentNullException(nameof(courseService));
     _cosmosDbQueryDispatcher     = cosmosDbQueryDispatcher ?? throw new ArgumentNullException(nameof(cosmosDbQueryDispatcher));
     _apprenticeshipSettings      = apprenticeshipSettings ?? throw new ArgumentNullException(nameof(apprenticeshipSettings));
     _standardsAndFrameworksCache = standardsAndFrameworksCache ?? throw new ArgumentNullException(nameof(standardsAndFrameworksCache));
     _providerContextProvider     = providerContextProvider;
 }
 public Handler(
     ISqlQueryDispatcher sqlQueryDispatcher,
     IFileUploadProcessor fileUploadProcessor,
     IProviderContextProvider providerContextProvider,
     ICurrentUserProvider currentUserProvider,
     IOptions <DataManagementOptions> optionsAccessor)
 {
     _sqlQueryDispatcher      = sqlQueryDispatcher;
     _fileUploadProcessor     = fileUploadProcessor;
     _providerContextProvider = providerContextProvider;
     _currentUserProvider     = currentUserProvider;
     _optionsAccessor         = optionsAccessor;
 }
Beispiel #27
0
 public Handler(
     ISqlQueryDispatcher sqlQueryDispatcher,
     JourneyInstanceProvider journeyInstanceProvider,
     ICurrentUserProvider currentUserProvider,
     IClock clock,
     IProviderContextProvider providerContextProvider)
 {
     _sqlQueryDispatcher      = sqlQueryDispatcher;
     _journeyInstanceProvider = journeyInstanceProvider;
     _currentUserProvider     = currentUserProvider;
     _clock = clock;
     _providerContextProvider = providerContextProvider;
 }
        public async Task <IActionResult> Confirmed(
            [FromServices] IProviderContextProvider providerContextProvider,
            [FromServices] IProviderInfoCache providerInfoCache,
            ConfirmedQuery request)
        {
            var vm = await _mediator.Send(request);

            var providerInfo = await providerInfoCache.GetProviderInfo(vm.ProviderId);

            providerContextProvider.SetProviderContext(new ProviderContext(providerInfo));

            return(View(vm));
        }
Beispiel #29
0
 public Handler(
     IFileUploadProcessor fileUploadProcessor,
     IProviderContextProvider providerContextProvider,
     ISqlQueryDispatcher sqlQueryDispatcher,
     IClock clock,
     IRegionCache regionCache)
 {
     _fileUploadProcessor     = fileUploadProcessor;
     _providerContextProvider = providerContextProvider;
     _sqlQueryDispatcher      = sqlQueryDispatcher;
     _clock       = clock;
     _regionCache = regionCache;
 }
Beispiel #30
0
 public Handler(
     ICosmosDbQueryDispatcher cosmosDbQueryDispatcher,
     MptxInstanceContext <FlowModel> flow,
     IProviderContextProvider providerContextProvider,
     ICurrentUserProvider currentUserProvider,
     IClock clock)
 {
     _cosmosDbQueryDispatcher = cosmosDbQueryDispatcher;
     _flow = flow;
     _providerContextProvider = providerContextProvider;
     _currentUserProvider     = currentUserProvider;
     _clock = clock;
 }