예제 #1
0
        public async Task <QuickOrder> CreateQuickOrderAsync(
            [GraphQLType(typeof(CreateQuickOrderInputType))][GraphQLName("input")]
            CreateQuickOrderCommand input, [Service] ISheaftMediatr mediatr,
            QuickOrdersByIdBatchDataLoader quickOrdersDataLoader, CancellationToken token)
        {
            var result = await ExecuteAsync <CreateQuickOrderCommand, Guid>(mediatr, input, token);

            return(await quickOrdersDataLoader.LoadAsync(result, token));
        }
예제 #2
0
        public async Task <QuickOrder> UpdateQuickOrderAsync(
            [GraphQLType(typeof(UpdateQuickOrderInputType))][GraphQLName("input")]
            UpdateQuickOrderCommand input, [Service] ISheaftMediatr mediatr,
            QuickOrdersByIdBatchDataLoader quickOrdersDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await quickOrdersDataLoader.LoadAsync(input.QuickOrderId, token));
        }
예제 #3
0
 public RefusePurchaseOrderCommandHandler(
     IAppDbContext context,
     ISheaftMediatr mediatr,
     ITableService tableService,
     ILogger <RefusePurchaseOrderCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _tableService = tableService;
 }
예제 #4
0
 public CreatePayoutCommandHandler(
     ISheaftMediatr mediatr,
     IAppDbContext context,
     IPspService pspService,
     ILogger <CreatePayoutCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _pspService = pspService;
 }
예제 #5
0
 public UpdateConsumerOrderCommandHandler(
     IAppDbContext context,
     ISheaftMediatr mediatr,
     IOrderService orderService,
     ILogger <UpdateConsumerOrderCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _orderService = orderService;
 }
예제 #6
0
 public DashboardController(
     IAppDbContext context,
     IMapper mapper,
     ISheaftMediatr mediatr,
     IConfigurationProvider configurationProvider,
     IOptionsSnapshot <RoleOptions> roleOptions)
     : base(context, mapper, roleOptions, mediatr, configurationProvider)
 {
 }
 public RefreshPreAuthorizationStatusCommandHandler(
     IAppDbContext context,
     ISheaftMediatr mediatr,
     IPspService pspService,
     ILogger <RefreshPreAuthorizationStatusCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _pspService = pspService;
 }
 public RefreshWithholdingStatusCommandHandler(
     ISheaftMediatr mediatr,
     IAppDbContext context,
     IPspService pspService,
     ILogger <RefreshWithholdingStatusCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _pspService = pspService;
 }
예제 #9
0
        public async Task <IEnumerable <BusinessClosing> > UpdateOrCreateBusinessClosingsAsync(
            [GraphQLType(typeof(UpdateOrCreateBusinessClosingsInputType))][GraphQLName("input")]
            UpdateOrCreateBusinessClosingsCommand input, [Service] ISheaftMediatr mediatr,
            BusinessClosingsByIdBatchDataLoader businessClosingsDataLoader, CancellationToken token)
        {
            var result =
                await ExecuteAsync <UpdateOrCreateBusinessClosingsCommand, IEnumerable <Guid> >(mediatr, input, token);

            return(await businessClosingsDataLoader.LoadAsync(result.ToList(), token));
        }
예제 #10
0
        public async Task <IEnumerable <PurchaseOrder> > CreateBusinessOrderAsync(
            [GraphQLType(typeof(CreateBusinessOrderInputType))][GraphQLName("input")]
            CreateBusinessOrderCommand input, [Service] ISheaftMediatr mediatr,
            PurchaseOrdersByIdBatchDataLoader purchaseOrdersDataLoader, CancellationToken token)
        {
            var result =
                await ExecuteAsync <CreateBusinessOrderCommand, IEnumerable <Guid> >(mediatr, input, token);

            return(await purchaseOrdersDataLoader.LoadAsync(result.ToList(), token));
        }
예제 #11
0
        public async Task <Job> ExportBillingsAsync(
            [GraphQLType(typeof(QueueExportBillingsInputType))][GraphQLName("input")]
            QueueExportBillingsCommand input, [Service] ISheaftMediatr mediatr,
            JobsByIdBatchDataLoader jobsDataLoader, CancellationToken token)
        {
            var result =
                await ExecuteAsync <QueueExportBillingsCommand, Guid>(mediatr, input, token);

            return(await jobsDataLoader.LoadAsync(result, token));
        }
예제 #12
0
        public async Task <DeliveryClosing> UpdateOrCreateDeliveryClosingAsync(
            [GraphQLType(typeof(UpdateOrCreateDeliveryClosingInputType))][GraphQLName("input")]
            UpdateOrCreateDeliveryClosingCommand input, [Service] ISheaftMediatr mediatr,
            DeliveryClosingsByIdBatchDataLoader businessClosingsDataLoader, CancellationToken token)
        {
            var result =
                await ExecuteAsync <UpdateOrCreateDeliveryClosingCommand, Guid>(mediatr, input, token);

            return(await businessClosingsDataLoader.LoadAsync(result, token));
        }
예제 #13
0
 public SendPageCommandHandler(
     IAppDbContext context,
     IPspService pspService,
     IBlobService blobService,
     ISheaftMediatr mediatr,
     ILogger <SendPageCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _pspService  = pspService;
     _blobService = blobService;
 }
예제 #14
0
 public SendRecallCommandHandler(
     ISheaftMediatr mediatr,
     IAppDbContext context,
     ICurrentUserService currentUserService,
     IOptionsSnapshot <RoleOptions> roleOptions,
     ILogger <SendRecallCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _currentUserService = currentUserService;
     _roleOptions        = roleOptions.Value;
 }
예제 #15
0
 public CreatePurchaseOrderCommandHandler(
     IAppDbContext context,
     ISheaftMediatr mediatr,
     IIdentifierService identifierService,
     ITableService tableService,
     ILogger <CreatePurchaseOrderCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _identifierService = identifierService;
     _tableService      = tableService;
 }
예제 #16
0
 public ExportBillingsCommandHandler(
     ISheaftMediatr mediatr,
     IAppDbContext context,
     IBlobService blobService,
     IBillingsExportersFactory billingsExportersFactory,
     ILogger <ExportBillingsCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _blobService = blobService;
     _billingsExportersFactory = billingsExportersFactory;
 }
예제 #17
0
 public UpdateProducerCommandHandler(
     IAppDbContext context,
     ISheaftMediatr mediatr,
     IPictureService imageService,
     ILogger <UpdateProducerCommandHandler> logger,
     IOptionsSnapshot <RoleOptions> roleOptions)
     : base(mediatr, context, logger)
 {
     _imageService = imageService;
     _roleOptions  = roleOptions.Value;
 }
예제 #18
0
 public CreateConsumerOrderCommandHandler(
     IAppDbContext context,
     ISheaftMediatr mediatr,
     IOrderService orderService,
     IOptionsSnapshot <PspOptions> pspOptions,
     ILogger <CreateConsumerOrderCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _orderService = orderService;
     _pspOptions   = pspOptions.Value;
 }
예제 #19
0
 public DocumentsController(
     IAppDbContext context,
     IMapper mapper,
     IBlobService blobService,
     ISheaftMediatr mediatr,
     IOptionsSnapshot <RoleOptions> roleOptions,
     IConfigurationProvider configurationProvider)
     : base(context, mapper, roleOptions, mediatr, configurationProvider)
 {
     _blobService = blobService;
 }
예제 #20
0
 public GenerateDeliveryFormCommandHandler(
     ISheaftMediatr mediatr,
     IAppDbContext context,
     IPdfGenerator pdfGenerator,
     IBlobService blobService,
     ILogger <GenerateDeliveryFormCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _pdfGenerator = pdfGenerator;
     _blobService  = blobService;
 }
예제 #21
0
 public ExportPickingOrderCommandHandler(
     ISheaftMediatr mediatr,
     IAppDbContext context,
     IBlobService blobsService,
     IPickingOrdersExportersFactory pickingOrdersExportersFactory,
     ILogger <ExportPickingOrderCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _blobsService = blobsService;
     _pickingOrdersExportersFactory = pickingOrdersExportersFactory;
 }
예제 #22
0
        public async Task <DateTimeOffset> MarkMyNotificationsAsReadAsync([Service] ISheaftMediatr mediatr, CancellationToken token)
        {
            var input = new MarkUserNotificationsAsReadCommand(CurrentUser)
            {
                ReadBefore = DateTimeOffset.UtcNow
            };

            await ExecuteAsync(mediatr, input, token);

            return(input.ReadBefore);
        }
예제 #23
0
 public GenerateStoresFileCommandHandler(
     IAppDbContext context,
     ISheaftMediatr mediatr,
     IBlobService blobService,
     IIdSerializer idSerializer,
     ILogger <GenerateStoresFileCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _blobService  = blobService;
     _idSerializer = idSerializer;
 }
예제 #24
0
 public DeliveryFormGeneratedEventHandler(
     ISheaftMediatr mediatr,
     IAppDbContext context,
     IEmailService emailService,
     IBlobService blobService,
     ISignalrService signalrService)
     : base(context, emailService, signalrService)
 {
     _mediatr     = mediatr;
     _blobService = blobService;
 }
예제 #25
0
 public CreateProductCommandHandler(
     ISheaftMediatr mediatr,
     IAppDbContext context,
     IPictureService imageService,
     IIdentifierService identifierService,
     ILogger <CreateProductCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _imageService      = imageService;
     _identifierService = identifierService;
 }
 public RefreshLegalValidationCommandHandler(
     ISheaftMediatr mediatr,
     IAppDbContext context,
     IPspService pspService,
     IOptionsSnapshot <PspOptions> pspOptions,
     ILogger <RefreshLegalValidationCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _pspOptions = pspOptions.Value;
     _pspService = pspService;
 }
예제 #27
0
 public ExportTransactionsCommandHandler(
     ISheaftMediatr mediatr,
     IAppDbContext context,
     IBlobService blobService,
     ITransactionsExportersFactory transactionsExportersFactory,
     ILogger <ExportTransactionsCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _blobService = blobService;
     _transactionsExportersFactory = transactionsExportersFactory;
 }
예제 #28
0
 public UpdateAuthUserCommandHandler(
     ISheaftMediatr mediatr,
     IAppDbContext context,
     IAuthService authService,
     IDistributedCache cache,
     ILogger <UpdateAuthUserCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _authService = authService;
     _cache       = cache;
 }
예제 #29
0
        public async Task <PreAuthorization> CreatePreAuthorization(
            [GraphQLType(typeof(CreatePreAuthorizationForOrderInputType))][GraphQLName("input")]
            CreatePreAuthorizationForOrderCommand input, [Service] ISheaftMediatr mediatr,
            PreAuthorizationsByIdBatchDataLoader preAuthorizationsDataLoader, CancellationToken token)
        {
            input.IpAddress = _httpContextAccessor.HttpContext.Connection.RemoteIpAddress.ToString();
            input.BrowserInfo.AcceptHeader = _httpContextAccessor.HttpContext.Request.Headers["Accept"];

            var result = await ExecuteAsync <CreatePreAuthorizationForOrderCommand, Guid>(mediatr, input, token);

            return(await preAuthorizationsDataLoader.LoadAsync(result, token));
        }
예제 #30
0
 public ImportProductsCommandHandler(
     ISheaftMediatr mediatr,
     IAppDbContext context,
     IBlobService blobService,
     IMapper mapper,
     IProductsImporterFactory productsImporterFactory,
     ILogger <ImportProductsCommandHandler> logger)
     : base(mediatr, context, logger)
 {
     _blobService             = blobService;
     _mapper                  = mapper;
     _productsImporterFactory = productsImporterFactory;
 }