コード例 #1
0
 public BasketsController(
     IBasketsRepository basketsRepository,
     IDiscountsRepository discountsRepository)
 {
     _basketsRepository   = basketsRepository;
     _discountsRepository = discountsRepository;
 }
コード例 #2
0
 public CreateDiscountHandler(IDiscountsRepository discountsRepository,
                              ICustomersRepository customersRepository,
                              IBusPublisher busPublisher, ILogger <CreateDiscountHandler> logger)
 {
     _discountsRepository = discountsRepository;
     _customersRepository = customersRepository;
     _busPublisher        = busPublisher;
     _logger = logger;
 }
コード例 #3
0
 public TransactionsFacade(
     IUsersRepository usersRepository,
     IProductsRepository productsRepository,
     IDiscountsRepository discountRepository,
     IEnvironment environment,
     ILockService lockService,
     ITransactionErrorsRepository errorsRepository,
     ITransactionsRepository transactionsRepository
     )
 {
     this.usersRepository        = usersRepository;
     this.productsRepository     = productsRepository;
     this.discountRepository     = discountRepository;
     this.environment            = environment;
     this.lockService            = lockService;
     this.errorsRepository       = errorsRepository;
     this.transactionsRepository = transactionsRepository;
 }
コード例 #4
0
 // Using dependency injection to inject the repositories to the service.
 public CheckoutService(ICheckoutRepository checkoutRepo, IProductsRepository productsRepo, IDiscountsRepository discountsRepo)
 {
     _checkoutRepo  = checkoutRepo;
     _productsRepo  = productsRepo;
     _discountsRepo = discountsRepo;
 }
コード例 #5
0
        public DiscountsRepositoryTests()
        {
            var resolver = new XmlPathResolver();

            repository = new DiscountsRepository(resolver);
        }
コード例 #6
0
 public DiscountService(IDiscountsRepository discountsRepository)
 {
     _discountsRepository = discountsRepository;
 }
コード例 #7
0
 public CreateDiscountHandler(IDiscountsRepository discountsRepository)
 {
     _discountsRepository = discountsRepository;
 }