public DeductSmsCreditsCommandHandler( ApplicationDbContext applicationDbContext, ISmsCreditCalculator smsCreditCalculator) { _applicationDbContext = applicationDbContext; _smsCreditCalculator = smsCreditCalculator; }
public SendSmsCommandHandler( ISmsCreditCalculator smsCreditCalculator, IBus bus, IHttpContextAccessor httpContextAccessor, IQueryProcessor queryProcessor, IApplicationDbContextFactory dbContextFactory) { _smsCreditCalculator = smsCreditCalculator ?? throw new ArgumentNullException(nameof(smsCreditCalculator)); _bus = bus ?? throw new ArgumentNullException(nameof(bus)); _httpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor)); _queryProcessor = queryProcessor ?? throw new ArgumentNullException(nameof(queryProcessor)); _dbContextFactory = dbContextFactory; }
public SendSmsCommandHandler( ISmsCreditCalculator smsCreditCalculator, IPublishEndpoint publishEndpoint, ApplicationDbContext applicationDbContext, IHttpContextAccessor httpContextAccessor, IQueryProcessor queryProcessor) { _smsCreditCalculator = smsCreditCalculator ?? throw new ArgumentNullException(nameof(smsCreditCalculator)); _publishEndpoint = publishEndpoint ?? throw new ArgumentNullException(nameof(publishEndpoint)); _applicationDbContext = applicationDbContext ?? throw new ArgumentNullException(nameof(applicationDbContext)); _httpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor)); _queryProcessor = queryProcessor ?? throw new ArgumentNullException(nameof(queryProcessor)); }