Пример #1
0
 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));
 }
Пример #2
0
 public SaleController(ISaleProcessor saleService, ITransactionFinder transactionFinder)
 {
     SaleService       = saleService ?? throw new ArgumentNullException(nameof(saleService));
     TransactionFinder = transactionFinder;
 }