Example #1
0
        public CreateOrderService(ICommandBus commandBus,
                                  IAccountDao accountDao,
                                  IServerSettings serverSettings,
                                  ReferenceDataService referenceDataService,
                                  IIBSServiceProvider ibsServiceProvider,
                                  IRuleCalculator ruleCalculator,
                                  IAccountChargeDao accountChargeDao,
                                  ICreditCardDao creditCardDao,
                                  IOrderDao orderDao,
                                  IPromotionDao promotionDao,
                                  IEventSourcedRepository <Promotion> promoRepository,
                                  ITaxiHailNetworkServiceClient taxiHailNetworkServiceClient,
                                  IPaymentService paymentService,
                                  IPayPalServiceFactory payPalServiceFactory,
                                  IOrderPaymentDao orderPaymentDao,
                                  IFeesDao feesDao,
                                  ILogger logger,
                                  IIbsCreateOrderService ibsCreateOrderService)
            : base(serverSettings, commandBus, accountChargeDao, paymentService, creditCardDao,
                   ibsServiceProvider, promotionDao, promoRepository, orderPaymentDao, accountDao,
                   payPalServiceFactory, logger, taxiHailNetworkServiceClient, ruleCalculator,
                   feesDao, referenceDataService, orderDao)
        {
            _commandBus                   = commandBus;
            _accountDao                   = accountDao;
            _referenceDataService         = referenceDataService;
            _serverSettings               = serverSettings;
            _orderDao                     = orderDao;
            _taxiHailNetworkServiceClient = taxiHailNetworkServiceClient;
            _logger = logger;
            _ibsCreateOrderService = ibsCreateOrderService;
            _resources             = new Resources.Resources(_serverSettings);

            _taxiHailNetworkHelper = new TaxiHailNetworkHelper(_serverSettings, _taxiHailNetworkServiceClient, _commandBus, _logger);
        }
Example #2
0
        public AdsServiceTest()
        {
            IConfiguration configuration = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build();

            _pictureRepository = new PicturesRepository(new InMemoryPersistence <PictureVO>());
            _adRepository      = new AdsRepository(new InMemoryPersistence <AdVO>());
            _calculator        = new RuleCalculator(_pictureRepository);
            _service           = new AdsService(_adRepository, _pictureRepository, _calculator, configuration);
        }
Example #3
0
 public AdsService(IAdsRepository adsRepository,
                   IPicturesRepository picturesRepository,
                   IRuleCalculator calculator,
                   IConfiguration configurator)
 {
     _adsRepository                = adsRepository;
     _picturesRepository           = picturesRepository;
     _calculator                   = calculator;
     limitToBeConsideredIrrelevant = configurator.GetValue <int>("LimitToBeConsideredIrrelevant");
 }
 public ValidateOrderService(
     IServerSettings serverSettings,
     IIBSServiceProvider ibsServiceProvider,
     IRuleCalculator ruleCalculator,
     TaxiHailNetworkServiceClient taxiHailNetworkServiceClient)
 {
     _serverSettings               = serverSettings;
     _ibsServiceProvider           = ibsServiceProvider;
     _ruleCalculator               = ruleCalculator;
     _taxiHailNetworkServiceClient = taxiHailNetworkServiceClient;
 }
Example #5
0
        internal BaseCreateOrderService(IServerSettings serverSettings,
                                        ICommandBus commandBus,
                                        IAccountChargeDao accountChargeDao,
                                        IPaymentService paymentService,
                                        ICreditCardDao creditCardDao,
                                        IIBSServiceProvider ibsServiceProvider,
                                        IPromotionDao promotionDao,
                                        IEventSourcedRepository <Promotion> promoRepository,
                                        IOrderPaymentDao orderPaymentDao,
                                        IAccountDao accountDao,
                                        IPayPalServiceFactory payPalServiceFactory,
                                        ILogger logger,
                                        ITaxiHailNetworkServiceClient taxiHailNetworkServiceClient,
                                        IRuleCalculator ruleCalculator,
                                        IFeesDao feesDao,
                                        ReferenceDataService referenceDataService,
                                        IOrderDao orderDao)
        {
            _serverSettings               = serverSettings;
            _commandBus                   = commandBus;
            _accountChargeDao             = accountChargeDao;
            _paymentService               = paymentService;
            _creditCardDao                = creditCardDao;
            _ibsServiceProvider           = ibsServiceProvider;
            _promotionDao                 = promotionDao;
            _promoRepository              = promoRepository;
            _accountDao                   = accountDao;
            _logger                       = logger;
            _taxiHailNetworkServiceClient = taxiHailNetworkServiceClient;
            _ruleCalculator               = ruleCalculator;
            _feesDao                      = feesDao;
            _referenceDataService         = referenceDataService;
            _orderDao                     = orderDao;

            _resources             = new Resources.Resources(_serverSettings);
            _taxiHailNetworkHelper = new TaxiHailNetworkHelper(_serverSettings, _taxiHailNetworkServiceClient, _commandBus, _logger);

            PaymentHelper = new CreateOrderPaymentHelper(serverSettings, commandBus, paymentService, orderPaymentDao, payPalServiceFactory);
        }