public AntifraudProcessor(ISaleProcessor saleProcessor, IClearSaleService clearSaleService, ITransactionCreator transactionCreator, ApplicationDbContext dbContext) { SaleProcessor = saleProcessor ?? throw new ArgumentNullException(nameof(saleProcessor)); ClearSaleService = clearSaleService ?? throw new ArgumentNullException(nameof(clearSaleService)); TransactionCreator = transactionCreator ?? throw new ArgumentNullException(nameof(transactionCreator)); DbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); }
public SaleController(ISaleProcessor saleService, ITransactionFinder transactionFinder) { SaleService = saleService ?? throw new ArgumentNullException(nameof(saleService)); TransactionFinder = transactionFinder; }