public OrderModuleController(
     ICustomerOrderService customerOrderService
     , ICustomerOrderSearchService searchService
     , IStoreService storeService
     , IUniqueNumberGenerator numberGenerator
     , IPlatformMemoryCache platformMemoryCache
     , Func <IOrderRepository> repositoryFactory
     , ICustomerOrderBuilder customerOrderBuilder
     , IShoppingCartService cartService
     , IChangeLogSearchService changeLogSearchService
     , INotificationTemplateRenderer notificationTemplateRenderer
     , INotificationSearchService notificationSearchService
     , ICustomerOrderTotalsCalculator totalsCalculator)
 {
     _customerOrderService  = customerOrderService;
     _searchService         = searchService;
     _uniqueNumberGenerator = numberGenerator;
     _storeService          = storeService;
     _platformMemoryCache   = platformMemoryCache;
     _repositoryFactory     = repositoryFactory;
     //_securityService = securityService;
     //_permissionScopeService = permissionScopeService;
     _customerOrderBuilder         = customerOrderBuilder;
     _cartService                  = cartService;
     _changeLogSearchService       = changeLogSearchService;
     _notificationTemplateRenderer = notificationTemplateRenderer;
     _notificationSearchService    = notificationSearchService;
     _totalsCalculator             = totalsCalculator;
 }
 public OrderModuleController(
     ICustomerOrderService customerOrderService
     , ICustomerOrderSearchService searchService
     , IStoreService storeService
     , IUniqueNumberGenerator numberGenerator
     , IPlatformMemoryCache platformMemoryCache
     , Func <IOrderRepository> repositoryFactory
     , ICustomerOrderBuilder customerOrderBuilder
     , IShoppingCartService cartService
     , IChangeLogSearchService changeLogSearchService
     , INotificationTemplateRenderer notificationTemplateRenderer
     , INotificationSearchService notificationSearchService
     , ICustomerOrderTotalsCalculator totalsCalculator
     , IAuthorizationService authorizationService
     , IConverter converter
     , IOptions <HtmlToPdfOptions> htmlToPdfOptions
     , IOptions <MvcNewtonsoftJsonOptions> jsonOptionsAccessor)
 {
     _customerOrderService         = customerOrderService;
     _searchService                = searchService;
     _uniqueNumberGenerator        = numberGenerator;
     _storeService                 = storeService;
     _platformMemoryCache          = platformMemoryCache;
     _repositoryFactory            = repositoryFactory;
     _customerOrderBuilder         = customerOrderBuilder;
     _cartService                  = cartService;
     _changeLogSearchService       = changeLogSearchService;
     _notificationTemplateRenderer = notificationTemplateRenderer;
     _notificationSearchService    = notificationSearchService;
     _totalsCalculator             = totalsCalculator;
     _authorizationService         = authorizationService;
     _htmlToPdfOptions             = htmlToPdfOptions.Value;
     _converter   = converter;
     _jsonOptions = jsonOptionsAccessor.Value;
 }
Exemplo n.º 3
0
 public OrderModuleController(
     ICustomerOrderService customerOrderService,
     ICustomerOrderSearchService searchService,
     IStoreService storeService,
     IUniqueNumberGenerator numberGenerator,
     ICacheManager<object> cacheManager,
     Func<IOrderRepository> repositoryFactory,
     IPermissionScopeService permissionScopeService,
     ISecurityService securityService,
     ICustomerOrderBuilder customerOrderBuilder,
     IShoppingCartService cartService,
     INotificationManager notificationManager,
     INotificationTemplateResolver notificationTemplateResolver,
     IChangeLogService changeLogService,
     ICustomerOrderTotalsCalculator totalsCalculator)
 {
     _customerOrderService = customerOrderService;
     _searchService = searchService;
     _uniqueNumberGenerator = numberGenerator;
     _storeService = storeService;
     _cacheManager = cacheManager;
     _repositoryFactory = repositoryFactory;
     _securityService = securityService;
     _permissionScopeService = permissionScopeService;
     _customerOrderBuilder = customerOrderBuilder;
     _cartService = cartService;
     _notificationManager = notificationManager;
     _notificationTemplateResolver = notificationTemplateResolver;
     _changeLogService = changeLogService;
     _totalsCalculator = totalsCalculator;
 }
		public OrderModuleController(ICustomerOrderService customerOrderService, ICustomerOrderSearchService searchService, IStoreService storeService, IOperationNumberGenerator numberGenerator, CacheManager cacheManager, Func<IOrderRepository> repositoryFactory)
        {
            _customerOrderService = customerOrderService;
            _searchService = searchService;
            _operationNumberGenerator = numberGenerator;
            _storeService = storeService;
			_cacheManager = cacheManager;
			_repositoryFactory = repositoryFactory;
        }
 public OrderModuleController(ICustomerOrderService customerOrderService, ICustomerOrderSearchService searchService, IStoreService storeService, IOperationNumberGenerator numberGenerator, CacheManager cacheManager, Func <IOrderRepository> repositoryFactory)
 {
     _customerOrderService     = customerOrderService;
     _searchService            = searchService;
     _operationNumberGenerator = numberGenerator;
     _storeService             = storeService;
     _cacheManager             = cacheManager;
     _repositoryFactory        = repositoryFactory;
 }
 public OrdersSynchronizationJob(IOrdersSynchronizationService ordersSynchronizationService, IPushNotificationManager pushNotificationManager,
                                 IChangeLogSearchService changeLogService, ICustomerOrderSearchService orderSearchService, ISettingsManager settingsManager)
 {
     _ordersSynchronizationService = ordersSynchronizationService;
     _pushNotificationManager      = pushNotificationManager;
     _changeLogService             = changeLogService;
     _orderSearchService           = orderSearchService;
     _settingsManager = settingsManager;
 }
 public SubscriptionServiceImpl(IStoreService storeService, ICustomerOrderService customerOrderService, ICustomerOrderSearchService customerOrderSearchService, Func <ISubscriptionRepository> subscriptionRepositoryFactory, IUniqueNumberGenerator uniqueNumberGenerator, IEventPublisher eventPublisher, IPlatformMemoryCache platformMemoryCache)
 {
     _storeService                  = storeService;
     _customerOrderService          = customerOrderService;
     _customerOrderSearchService    = customerOrderSearchService;
     _subscriptionRepositoryFactory = subscriptionRepositoryFactory;
     _uniqueNumberGenerator         = uniqueNumberGenerator;
     _eventPublisher                = eventPublisher;
     _platformMemoryCache           = platformMemoryCache;
 }
Exemplo n.º 8
0
 public SearchOrderQueryHandler(IMapper mapper,
                                ISearchPhraseParser searchPhraseParser,
                                ICustomerOrderAggregateRepository customerOrderAggregateRepository,
                                ICustomerOrderSearchService customerOrderSearchService)
 {
     _mapper             = mapper;
     _searchPhraseParser = searchPhraseParser;
     _customerOrderAggregateRepository = customerOrderAggregateRepository;
     _customerOrderSearchService       = customerOrderSearchService;
 }
 public ChangeLogBasedOrdersFeed(IChangeLogSearchService changeLogSearchService, ICustomerOrderSearchService orderSearchService,
                                 DateTime?startDate, DateTime?endDate, int batchSize)
 {
     _changeLogSearchService = changeLogSearchService;
     _orderSearchService     = orderSearchService;
     _startDate = startDate;
     _endDate   = endDate;
     _skip      = 0;
     _take      = batchSize;
 }
Exemplo n.º 10
0
 public SubscriptionServiceImpl(Func <ISubscriptionRepository> subscriptionRepositoryFactory, ICustomerOrderService customerOrderService, ICustomerOrderSearchService customerOrderSearchService,
                                IStoreService storeService, IUniqueNumberGenerator uniqueNumberGenerator, IChangeLogService changeLogService, IEventPublisher eventPublisher)
 {
     _customerOrderSearchService    = customerOrderSearchService;
     _subscriptionRepositoryFactory = subscriptionRepositoryFactory;
     _customerOrderService          = customerOrderService;
     _storeService          = storeService;
     _uniqueNumberGenerator = uniqueNumberGenerator;
     _changeLogService      = changeLogService;
     _eventPublisher        = eventPublisher;
 }
Exemplo n.º 11
0
 public OrderExportImport(ICustomerOrderSearchService customerOrderSearchService, ICustomerOrderService customerOrderService)
 {
     _customerOrderSearchService = customerOrderSearchService;
     _customerOrderService       = customerOrderService;
     _serializer = new JsonSerializer
     {
         ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
         Formatting            = Formatting.Indented,
         NullValueHandling     = NullValueHandling.Ignore
     };
 }
        public OrderModuleController(ICustomerOrderService customerOrderService, ICustomerOrderSearchService searchService, IStoreService storeService, IUniqueNumberGenerator numberGenerator, 
                                     CacheManager cacheManager, Func<IOrderRepository> repositoryFactory, IPermissionScopeService permissionScopeService, ISecurityService securityService)
        {
            _customerOrderService = customerOrderService;
            _searchService = searchService;
            _uniqueNumberGenerator = numberGenerator;
            _storeService = storeService;
			_cacheManager = cacheManager;
			_repositoryFactory = repositoryFactory;
            _securityService = securityService;
            _permissionScopeService = permissionScopeService;
        }
 public OrderModuleController(ICustomerOrderService customerOrderService, ICustomerOrderSearchService searchService, IStoreService storeService, IUniqueNumberGenerator numberGenerator,
                              CacheManager cacheManager, Func <IOrderRepository> repositoryFactory, IPermissionScopeService permissionScopeService, ISecurityService securityService)
 {
     _customerOrderService   = customerOrderService;
     _searchService          = searchService;
     _uniqueNumberGenerator  = numberGenerator;
     _storeService           = storeService;
     _cacheManager           = cacheManager;
     _repositoryFactory      = repositoryFactory;
     _securityService        = securityService;
     _permissionScopeService = permissionScopeService;
 }
        public CustomerOrderServiceImplIntegrationTests()
        {
            _storeServiceMock                 = new Mock <IStoreService>();
            _shippingMethodRegistrarMock      = new Mock <IShippingMethodsRegistrar>();
            _shippingMethodsSearchServiceMock = new Mock <IShippingMethodsSearchService>();
            _shippingMethodsSearchServiceMock.Setup(s => s.SearchShippingMethodsAsync(It.IsAny <ShippingMethodsSearchCriteria>())).ReturnsAsync(new ShippingMethodsSearchResult());
            _paymentMethodRegistrarMock  = new Mock <IPaymentMethodsRegistrar>();
            _paymentMethodsSearchService = new Mock <IPaymentMethodsSearchService>();
            _paymentMethodsSearchService.Setup(s => s.SearchPaymentMethodsAsync(It.IsAny <PaymentMethodsSearchCriteria>())).ReturnsAsync(new PaymentMethodsSearchResult());
            _uniqueNumberGeneratorMock         = new Mock <IUniqueNumberGenerator>();
            _customerOrderTotalsCalculatorMock = new Mock <ICustomerOrderTotalsCalculator>();
            _eventPublisherMock         = new Mock <IEventPublisher>();
            _dynamicPropertyServiceMock = new Mock <IDynamicPropertyService>();
            _cacheEntryMock             = new Mock <ICacheEntry>();
            _cacheEntryMock.SetupGet(c => c.ExpirationTokens).Returns(new List <IChangeToken>());
            _changeLogServiceMock = new Mock <IChangeLogService>();
            _logMock = new Mock <ILogger <PlatformMemoryCache> >();
            var cachingOptions = new OptionsWrapper <CachingOptions>(new CachingOptions {
                CacheEnabled = true
            });
            var memoryCache = new MemoryCache(new MemoryCacheOptions()
            {
                Clock = new SystemClock(),
            });

            _platformMemoryCache = new PlatformMemoryCache(memoryCache, cachingOptions, _logMock.Object);

            var container = new ServiceCollection();

            container.AddDbContext <OrderDbContext>(options => options.UseSqlServer("Data Source=(local);Initial Catalog=VirtoCommerce3_orderTest;Persist Security Info=True;User ID=virto;Password=virto;MultipleActiveResultSets=True;Connect Timeout=30"));
            container.AddScoped <IOrderRepository, OrderRepository>();
            container.AddScoped <ICustomerOrderService, CustomerOrderService>();
            container.AddScoped <ICustomerOrderSearchService, CustomerOrderSearchService>();
            container.AddScoped <Func <IOrderRepository> >(provider => () => provider.CreateScope().ServiceProvider.GetService <IOrderRepository>());
            container.AddScoped <IEventPublisher, InProcessBus>();
            container.AddSingleton(tc => _customerOrderTotalsCalculatorMock.Object);
            container.AddSingleton(x => _uniqueNumberGeneratorMock.Object);
            container.AddSingleton(x => _dynamicPropertyServiceMock.Object);
            container.AddSingleton(x => _storeServiceMock.Object);
            container.AddSingleton(x => _shippingMethodRegistrarMock.Object);
            container.AddSingleton(x => _shippingMethodsSearchServiceMock.Object);
            container.AddSingleton(x => _paymentMethodRegistrarMock.Object);
            container.AddSingleton(x => _paymentMethodsSearchService.Object);
            container.AddSingleton(x => _platformMemoryCache);
            container.AddSingleton(x => _changeLogServiceMock.Object);

            var serviceProvider = container.BuildServiceProvider();

            _customerOrderService       = serviceProvider.GetService <ICustomerOrderService>();
            _customerOrderSearchService = serviceProvider.GetService <ICustomerOrderSearchService>();
        }
Exemplo n.º 15
0
 public SubscriptionServiceImpl(Func <ISubscriptionRepository> subscriptionRepositoryFactory, ICustomerOrderService customerOrderService,
                                ICustomerOrderSearchService customerOrderSearchService, IStoreService storeService,
                                IUniqueNumberGenerator uniqueNumberGenerator, IChangeLogService changeLogService, IEventPublisher eventPublisher,
                                IPlatformMemoryCache platformMemoryCache)
 {
     CustomerOrderSearchService    = customerOrderSearchService;
     SubscriptionRepositoryFactory = subscriptionRepositoryFactory;
     CustomerOrderService          = customerOrderService;
     StoreService          = storeService;
     UniqueNumberGenerator = uniqueNumberGenerator;
     ChangeLogService      = changeLogService;
     EventPublisher        = eventPublisher;
     PlatformMemoryCache   = platformMemoryCache;
 }
Exemplo n.º 16
0
        public CustomerOrderServiceImplIntegrationTests()
        {
            _storeServiceMock                  = new Mock <IStoreService>();
            _shippingMethodRegistrarMock       = new Mock <IShippingMethodsRegistrar>();
            _paymentMethodRegistrarMock        = new Mock <IPaymentMethodsRegistrar>();
            _uniqueNumberGeneratorMock         = new Mock <IUniqueNumberGenerator>();
            _customerOrderTotalsCalculatorMock = new Mock <ICustomerOrderTotalsCalculator>();
            //_eventPublisherMock = new Mock<IEventPublisher>();
            _dynamicPropertyServiceMock = new Mock <IDynamicPropertyService>();
            _platformMemoryCacheMock    = new Mock <IPlatformMemoryCache>();
            _cacheEntryMock             = new Mock <ICacheEntry>();
            _cacheEntryMock.SetupGet(c => c.ExpirationTokens).Returns(new List <IChangeToken>());
            _changeLogServiceMock = new Mock <IChangeLogService>();

            var container = new ServiceCollection();

            container.AddDbContext <OrderDbContext>(options => options.UseSqlServer("Data Source=(local);Initial Catalog=VirtoCommerce3;Persist Security Info=True;User ID=virto;Password=virto;MultipleActiveResultSets=True;Connect Timeout=30"));
            container.AddScoped <IOrderRepository, OrderRepositoryImpl>();
            container.AddScoped <ICustomerOrderService, CustomerOrderServiceImpl>();
            container.AddScoped <ICustomerOrderSearchService, CustomerOrderSearchServiceImpl>();
            container.AddScoped <Func <IOrderRepository> >(provider => () => provider.CreateScope().ServiceProvider.GetService <IOrderRepository>());
            container.AddScoped <IEventPublisher, InProcessBus>();
            container.AddSingleton(tc => _customerOrderTotalsCalculatorMock.Object);
            container.AddSingleton(x => _uniqueNumberGeneratorMock.Object);
            container.AddSingleton(x => _dynamicPropertyServiceMock.Object);
            container.AddSingleton(x => _storeServiceMock.Object);
            container.AddSingleton(x => _shippingMethodRegistrarMock.Object);
            container.AddSingleton(x => _paymentMethodRegistrarMock.Object);
            container.AddSingleton(x => _platformMemoryCacheMock.Object);
            container.AddSingleton(x => _changeLogServiceMock.Object);

            var serviceProvider = container.BuildServiceProvider();

            _customerOrderService       = serviceProvider.GetService <ICustomerOrderService>();
            _customerOrderSearchService = serviceProvider.GetService <ICustomerOrderSearchService>();
        }
 public ShipstationController(ICustomerOrderService orderService, ICustomerOrderSearchService orderSearchService)
 {
     _orderSearchService = orderSearchService;
     _orderService = orderService;
 }
 public CustomerOrderServiceExtImpl(Func <IOrderRepository> orderRepositoryFactory, IUniqueNumberGenerator uniqueNumberGenerator, IEventPublisher <OrderChangeEvent> eventPublisher,
                                    IDynamicPropertyService dynamicPropertyService, IShippingMethodsService shippingMethodsService, IPaymentMethodsService paymentMethodsService,
                                    IStoreService storeService, IChangeLogService changelogService, ICustomerOrderSearchService orderSearchService) : base(orderRepositoryFactory, uniqueNumberGenerator, eventPublisher, dynamicPropertyService, shippingMethodsService, paymentMethodsService, storeService, changelogService)
 {
     _orderSearchService = orderSearchService;
 }
Exemplo n.º 19
0
 public GetOrderQueryHandler(ICustomerOrderAggregateRepository customerOrderAggregateRepository, ICustomerOrderSearchService customerOrderSearchService)
 {
     _customerOrderAggregateRepository = customerOrderAggregateRepository;
     _customerOrderSearchService       = customerOrderSearchService;
 }
Exemplo n.º 20
0
 public OrderExportImport(ICustomerOrderSearchService customerOrderSearchService, ICustomerOrderService customerOrderService)
 {
     _customerOrderSearchService = customerOrderSearchService;
     _customerOrderService       = customerOrderService;
 }
Exemplo n.º 21
0
 public OrdersProvider(ICustomerOrderSearchService orderService)
 {
     _orderService = orderService;
 }
Exemplo n.º 22
0
 public OrderExportImport(ICustomerOrderSearchService customerOrderSearchService, ICustomerOrderService customerOrderService)
 {
     _customerOrderSearchService = customerOrderSearchService;
     _customerOrderService = customerOrderService;
 }
 public ShipstationController(ICustomerOrderService orderService, ICustomerOrderSearchService orderSearchService)
 {
     _orderSearchService = orderSearchService;
     _orderService       = orderService;
 }
Exemplo n.º 24
0
 public OrderExportImport(ICustomerOrderSearchService customerOrderSearchService, ICustomerOrderService customerOrderService, JsonSerializer jsonSerializer)
 {
     _customerOrderSearchService = customerOrderSearchService;
     _customerOrderService       = customerOrderService;
     _jsonSerializer             = jsonSerializer;
 }
Exemplo n.º 25
0
 public OrdersProvider(ICustomerOrderSearchService orderService)
 {
     _orderService = orderService;
 }