示例#1
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="eventPublisher">Event publisher</param>
 /// <param name="itemRepository">item repository</param>
 public TaskService(ICacheManager cacheManager, IRepository<ScheduleTask, Guid> repository, IEventPublisher eventPublisher,IActivityLogService activityLogService)
 {
     this._cacheManager = cacheManager;
     this._repository = repository;
     this._eventPublisher = eventPublisher;
     _activityLogService = activityLogService;
 }
 public VendorAddressService(
     IRepository<VendorAddress> vendorAddressRepo,
     IEventPublisher eventPublisher)
 {
     _vendorAddressRepo = vendorAddressRepo;
     _eventPublisher = eventPublisher;
 }
示例#3
0
 /// <summary>
 /// Ctor
 /// </summary>
 public DiscountService(ICacheManager cacheManager,
     IRepository<Discount> discountRepository,
     IRepository<DiscountUsageHistory> discountUsageHistoryRepository,
     ILocalizationService localizationService,
     IStoreContext storeContext,
     IGenericAttributeService genericAttributeService,
     IPluginFinder pluginFinder,
     IEventPublisher eventPublisher,
     IRepository<Product> productRepository,
     IRepository<Category> categoryRepository,
     IRepository<Manufacturer> manufacturerRepository
     )
 {
     this._cacheManager = cacheManager;
     this._discountRepository = discountRepository;
     this._discountUsageHistoryRepository = discountUsageHistoryRepository;
     this._localizationService = localizationService;
     this._storeContext = storeContext;
     this._genericAttributeService = genericAttributeService;
     this._pluginFinder = pluginFinder;
     this._eventPublisher = eventPublisher;
     this._productRepository = productRepository;
     this._categoryRepository = categoryRepository;
     this._manufacturerRepository = manufacturerRepository;
 }
        public DiscountService(
            IPromoUtilities promoUtilities,
            PromoSettings promoSettings,
            ICacheManager cacheManager,
            IRepository<Discount> discountRepository,
            IRepository<DiscountRequirement> discountRequirementRepository,
            IRepository<DiscountUsageHistory> discountUsageHistoryRepository,
            IStoreContext storeContext,
            IGenericAttributeService genericAttributeService,
            IPluginFinder pluginFinder,
            IEventPublisher eventPublisher) : 
                base(
                    cacheManager,
                    discountRepository,
                    discountRequirementRepository,
                    discountUsageHistoryRepository,
                    storeContext,
                    genericAttributeService,
                    pluginFinder,
                    eventPublisher)
        {
            this._promoUtilities = promoUtilities;
            this._promoSettings = promoSettings;

            this._discountRepository = discountRepository;
            this._discountUsageHistoryRepository = discountUsageHistoryRepository;
            this._cacheManager = cacheManager;
            this._eventPublisher = eventPublisher;
        }
示例#5
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="vendorRepository">Vendor repository</param>
 /// <param name="eventPublisher">Event published</param>
 public VendorService(IRepository<Vendor> vendorRepository,
     IEventPublisher eventPublisher, IRepository<Customer> customerRepository)
 {
     this._vendorRepository = vendorRepository;
     this._eventPublisher = eventPublisher;
     this._customerRepository = customerRepository;
 }
示例#6
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="sciRepository">Shopping cart repository</param>
 /// <param name="workContext">Work context</param>
 /// <param name="currencyService">Currency service</param>
 /// <param name="productService">Product settings</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="productAttributeParser">Product attribute parser</param>
 /// <param name="checkoutAttributeService">Checkout attribute service</param>
 /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
 /// <param name="priceFormatter">Price formatter</param>
 /// <param name="customerService">Customer service</param>
 /// <param name="shoppingCartSettings">Shopping cart settings</param>
 /// <param name="eventPublisher">Event publisher</param>
 /// <param name="permissionService">Permission service</param>
 /// <param name="aclService">ACL service</param>
 public ShoppingCartService(IRepository<ShoppingCartItem> sciRepository,
     IWorkContext workContext, ICurrencyService currencyService,
     IProductService productService, ILocalizationService localizationService,
     IProductAttributeParser productAttributeParser,
     ICheckoutAttributeService checkoutAttributeService,
     ICheckoutAttributeParser checkoutAttributeParser,
     IPriceFormatter priceFormatter,
     ICustomerService customerService,
     ShoppingCartSettings shoppingCartSettings,
     IEventPublisher eventPublisher,
     IPermissionService permissionService, 
     IAclService aclService)
 {
     this._sciRepository = sciRepository;
     this._workContext = workContext;
     this._currencyService = currencyService;
     this._productService = productService;
     this._localizationService = localizationService;
     this._productAttributeParser = productAttributeParser;
     this._checkoutAttributeService = checkoutAttributeService;
     this._checkoutAttributeParser = checkoutAttributeParser;
     this._priceFormatter = priceFormatter;
     this._customerService = customerService;
     this._shoppingCartSettings = shoppingCartSettings;
     this._eventPublisher = eventPublisher;
     this._permissionService = permissionService;
     this._aclService = aclService;
 }
        internal WebServerOnlyRunner(
            ILogger logger,
            IEventSubscriptionManager eventSubscriptionManager,
            IEventPublisher eventPublisher,
            IWebServer webServer,
            Uri testHtmlPageUrl,
            string xapPath)
        {
            _logger = logger;
            _eventSubscriptionManager = eventSubscriptionManager;
            _webServer = webServer;
            _testHtmlPageUrl = testHtmlPageUrl;
            _xapPath = xapPath;

            _testResultAggregator = new TestResultAggregator(logger, eventPublisher, _xapPath);
            _eventSubscriptionManager.AddListener(_testResultAggregator);
            _continuousRunnerThread = new Thread(() =>
            {
                string line;
                do
                {
                    line = Console.ReadLine();
                } while (line.ToLower(CultureInfo.CurrentCulture) != "exit");
                //string line;
                //while ((line = System.Console.ReadLine())
                //        .ToLower(CultureInfo.CurrentCulture) != "exit")
                //{
                //    ;
                //}
            });
        }
 public ApplicationService(IRepository<Application> applicationRepository,
     IEventPublisher eventPublisher, ICacheManager cacheManager)
 {
     _applicationRepository = applicationRepository;
     _eventPublisher = eventPublisher;
     _cacheManager = cacheManager;
 }
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="cacheManager">Cache manager</param>
        /// <param name="categoryRepository">Category repository</param>
        /// <param name="productCategoryRepository">ProductCategory repository</param>
        /// <param name="productRepository">Product repository</param>
        /// <param name="aclRepository">ACL record repository</param>
		/// <param name="storeMappingRepository">Store mapping repository</param>
        /// <param name="workContext">Work context</param>
		/// <param name="storeContext">Store context</param>
        /// <param name="eventPublisher">Event publisher</param>
        public CategoryService(ICacheManager cacheManager,
            IRepository<Category> categoryRepository,
            IRepository<ProductCategory> productCategoryRepository,
            IRepository<Product> productRepository,
            IRepository<AclRecord> aclRepository,
			IRepository<StoreMapping> storeMappingRepository,
            IWorkContext workContext,
			IStoreContext storeContext,
            IEventPublisher eventPublisher,
			IStoreMappingService storeMappingService,
			IAclService aclService,
            Lazy<IEnumerable<ICategoryNavigationFilter>> navigationFilters,
            ICustomerService customerService,
            IProductService productService,
            IStoreService storeService)
        {
            this._cacheManager = cacheManager;
            this._categoryRepository = categoryRepository;
            this._productCategoryRepository = productCategoryRepository;
            this._productRepository = productRepository;
            this._aclRepository = aclRepository;
			this._storeMappingRepository = storeMappingRepository;
            this._workContext = workContext;
			this._storeContext = storeContext;
            this._eventPublisher = eventPublisher;
			this._storeMappingService = storeMappingService;
			this._aclService = aclService;
            this._navigationFilters = navigationFilters;
            this._customerService = customerService;
            this._productService = productService;
            this._storeService = storeService;

			this.QuerySettings = DbQuerySettings.Default;
        }
示例#10
0
 public ContactUsService(
     IRepository<ContactUs> contactusRepository,
     IEventPublisher eventPublisher)
 {
     this._contactusRepository = contactusRepository;
     this._eventPublisher = eventPublisher;
 }
        public WorkflowMessageService(
			IMessageTemplateService messageTemplateService,
            IQueuedEmailService queuedEmailService, 
			ILanguageService languageService,
            ITokenizer tokenizer, 
			IEmailAccountService emailAccountService,
            IMessageTokenProvider messageTokenProvider,
			IStoreService storeService,
			IStoreContext storeContext,
            EmailAccountSettings emailAccountSettings,
            IEventPublisher eventPublisher,
            IWorkContext workContext,
            HttpRequestBase httpRequest,
			IDownloadService downloadServioce)
        {
            this._messageTemplateService = messageTemplateService;
            this._queuedEmailService = queuedEmailService;
            this._languageService = languageService;
            this._tokenizer = tokenizer;
            this._emailAccountService = emailAccountService;
            this._messageTokenProvider = messageTokenProvider;
            this._storeService = storeService;
            this._storeContext = storeContext;
            this._emailAccountSettings = emailAccountSettings;
            this._eventPublisher = eventPublisher;
            this._workContext = workContext;
            this._httpRequest = httpRequest;
            this._downloadServioce = downloadServioce;
        }
示例#12
0
 public DemoService(IRepository<DemoEntity> demoRepository,
     IEventPublisher eventPublisher,IMapping mapping)
 {
     _demoRepository = demoRepository;
     _eventPublisher = eventPublisher;
     _mapping = mapping;
 }
示例#13
0
        public ImportManager(
			IProductService productService, 
			ICategoryService categoryService,
            IManufacturerService manufacturerService, 
			IPictureService pictureService,
            IUrlRecordService urlRecordService,
			SeoSettings seoSettings,
			IEventPublisher eventPublisher,
			IRepository<Product> rsProduct,
			IRepository<ProductCategory> rsProductCategory,
			IRepository<ProductManufacturer> rsProductManufacturer,
            IRepository<Picture> rsPicture,
			IRepository<ProductPicture> rsProductPicture,
            IRepository<UrlRecord> rsUrlRecord,
            ILanguageService languageService,
            ILocalizedEntityService localizedEntityService,
            IStoreMappingService storeMappingService)
        {
            this._productService = productService;
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._pictureService = pictureService;
            this._urlRecordService = urlRecordService;
            this._seoSettings = seoSettings;
            this._eventPublisher = eventPublisher;
            this._rsProduct = rsProduct;
            this._rsProductCategory = rsProductCategory;
            this._rsProductManufacturer = rsProductManufacturer;
            this._rsProductPicture = rsProductPicture;
            this._rsUrlRecord = rsUrlRecord;
            this._rsPicture = rsPicture;
            this._languageService = languageService;
            this._localizedEntityService = localizedEntityService;
            this._storeMappingService = storeMappingService;
        }
        public HomeInstallationQuoteController(
            IWorkContext workContext,
            ISettingService settingService,
            IGenericAttributeService genericAttributeService,
            ILocalizationService localizationService,
            IMessageTokenProvider messageTokenProvider,
            IEmailAccountService emailAccountService,
            IEventPublisher eventPublisher,
            IMessageTemplateService messageTemplateService,
            ITokenizer tokenizer,
            IQueuedEmailService queuedEmailService,
            IProductService productService,

            CaptchaSettings captchaSettings,
            EmailAccountSettings emailAccountSettings)
        {
            _workContext = workContext;
            _settingService = settingService;
            _genericAttributeService = genericAttributeService;
            _localizationService = localizationService;
            _messageTokenProvider = messageTokenProvider;
            _emailAccountService = emailAccountService;
            _eventPublisher = eventPublisher;
            _messageTemplateService = messageTemplateService;
            _tokenizer = tokenizer;
            _queuedEmailService = queuedEmailService;
            _productService = productService;
            _captchaSettings = captchaSettings;
            _emailAccountSettings = emailAccountSettings;
        }
 public MobSocialMessageService(IMessageTemplateService messageTemplateService,
                                    IStoreService storeService, IMessageTokenProvider messageTokenProvider,
                                    ILanguageService languageService,
                                    IStoreContext storeContext,
                                    IEventPublisher eventPublisher,
                                    ITokenizer tokenizer, IQueuedEmailService queuedEmailService,
                                    IEmailAccountService emailAccountService,
                                    EmailAccountSettings emailAccountSettings,
                                    ILocalizationService localizationService,
                                    MessageTemplatesSettings messageTemplateSettings,
                                    CatalogSettings catalogSettings,
                                    IProductAttributeParser productAttributeParser, IWorkContext workContext)
 {
     _messageTemplateService = messageTemplateService;
     _storeService = storeService;
     _messageTokenProvider = messageTokenProvider;
     _languageService = languageService;
     _storeContext = storeContext;
     _eventPublisher = eventPublisher;
     _tokenizer = tokenizer;
     _queuedEmailService = queuedEmailService;
     _emailAccountService = emailAccountService;
     _emailAccountSettings = emailAccountSettings;
     _localizationService = localizationService;
     _messageTemplateSettings = messageTemplateSettings;
     _catalogSettings = catalogSettings;
     _productAttributeParser = productAttributeParser;
     _workContext = workContext;
 }
示例#16
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="categoryTemplateRepository">Category template repository</param>
 /// <param name="eventPublisher">Event published</param>
 public CategoryTemplateService(ICacheManager cacheManager,
     IRepository<CategoryTemplate> categoryTemplateRepository, IEventPublisher eventPublisher)
 {
     _cacheManager = cacheManager;
     _categoryTemplateRepository = categoryTemplateRepository;
     _eventPublisher = eventPublisher;
 }
示例#17
0
        public new void SetUp()
        {
            _taxSettings = new TaxSettings();
            _taxSettings.DefaultTaxAddressId = 10;

            _workContext = null;

            _addressService = MockRepository.GenerateMock<IAddressService>();
            //default tax address
            _addressService.Expect(x => x.GetAddressById(_taxSettings.DefaultTaxAddressId)).Return(new Address { Id = _taxSettings.DefaultTaxAddressId });

            var pluginFinder = new PluginFinder();

            _eventPublisher = MockRepository.GenerateMock<IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg<object>.Is.Anything));

            _geoLookupService = MockRepository.GenerateMock<IGeoLookupService>();
            _countryService = MockRepository.GenerateMock<ICountryService>();
            _logger = MockRepository.GenerateMock<ILogger>();
            _customerSettings = new CustomerSettings();
            _addressSettings = new AddressSettings();

            _taxService = new TaxService(_addressService, _workContext, _taxSettings,
                pluginFinder, _geoLookupService, _countryService, _logger
                , _customerSettings, _addressSettings);
        }
        internal ContinuousConsoleRunner(
            ILogger logger,
            IEventSubscriptionManager eventSubscriptionManager,
            IEventPublisher eventPublisher ,
            string xapPath,
            ClientTestRunConfiguration clientTestRunConfiguration,
            IWebServer webServer,
            IWebBrowser webBrowser)
        {
            _xapPath = xapPath;
            _webServer = webServer;
            _xapFileBuildChangedMonitor = new XapFileBuildChangedMonitor(eventPublisher, _xapPath);

            _continuousRunnerThread = new Thread(() =>
            {
                using (var runner = new ContinuousTestRunner(logger, eventSubscriptionManager, eventPublisher, webBrowser, clientTestRunConfiguration, _xapPath))
                {
                    string line;
                    while (!(line = System.Console.ReadLine()).Equals("exit", StringComparison.OrdinalIgnoreCase))
                    {
                        runner.ForceFilteredTest(line);
                    }
                }
            });
        }
示例#19
0
        public FixtureLibrary StartSystem(FixtureAssembly fixtureAssembly, MarshalByRefObject remotePublisher)
        {
            _publisher = (IEventPublisher)remotePublisher;

            // TODO -- if fails, do a Thread.Sleep and try again
            _system = fixtureAssembly.FindSystem();
            ProjectFileSystem.RootFolder = fixtureAssembly.RootFolder;

            Project.Current = new Project
            {
                Profile = fixtureAssembly.Profile
            };

            try
            {
                var library = FixtureGraph.Library;
                _runner = new TestRunner(_system, library);
                if (_listener != null)
                {
                    _runner.Listener = _listener;
                }

                return library;
            }
            catch (TestEngineFailureException)
            {
                throw;
            }
            catch (Exception e)
            {
                throw new TestEngineFailureException(e.ToString());
            }
        }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="emailAccountRepository">Email account repository</param>
 /// <param name="emailAccountSettings"></param>
 /// <param name="eventPublisher">Event published</param>
 public EmailAccountService(IRepository<EmailAccount> emailAccountRepository,
     EmailAccountSettings emailAccountSettings, IEventPublisher eventPublisher)
 {
     _emailAccountRepository = emailAccountRepository;
     _emailAccountSettings = emailAccountSettings;
     _eventPublisher = eventPublisher;
 }
        public new void SetUp()
        {
            _languageRepo = MockRepository.GenerateMock<IRepository<Language>>();
            var lang1 = new Language
            {
                Name = "English",
                LanguageCulture = "en-Us",
                FlagImageFileName = "us.png",
                Published = true,
                DisplayOrder = 1
            };
            var lang2 = new Language
            {
                Name = "Russian",
                LanguageCulture = "ru-Ru",
                FlagImageFileName = "ru.png",
                Published = true,
                DisplayOrder = 2
            };

            _languageRepo.Expect(x => x.Table).Return(new List<Language>() { lang1, lang2 }.AsQueryable());

            _storeMappingRepo = MockRepository.GenerateMock<IRepository<StoreMapping>>();

            var cacheManager = new NopNullCache();

            _settingService = MockRepository.GenerateMock<ISettingService>();

            _eventPublisher = MockRepository.GenerateMock<IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg<object>.Is.Anything));

            _localizationSettings = new LocalizationSettings();
            _languageService = new LanguageService(cacheManager, _languageRepo, _storeMappingRepo,
                _settingService, _localizationSettings, _eventPublisher);
        }
示例#22
0
        public MessageTokenProvider(ILanguageService languageService,
            ILocalizationService localizationService, IDateTimeHelper dateTimeHelper,
            IEmailAccountService emailAccountService,
            IPriceFormatter priceFormatter, ICurrencyService currencyService,IWebHelper webHelper,
            IWorkContext workContext, IDownloadService downloadService,
            IOrderService orderService, IPaymentService paymentService,
            IProductAttributeParser productAttributeParser,
            StoreInformationSettings storeSettings, MessageTemplatesSettings templatesSettings,
            EmailAccountSettings emailAccountSettings, CatalogSettings catalogSettings,
            TaxSettings taxSettings, IEventPublisher eventPublisher)
        {
            this._languageService = languageService;
            this._localizationService = localizationService;
            this._dateTimeHelper = dateTimeHelper;
            this._emailAccountService = emailAccountService;
            this._priceFormatter = priceFormatter;
            this._currencyService = currencyService;
            this._webHelper = webHelper;
            this._workContext = workContext;
            this._downloadService = downloadService;
            this._orderService = orderService;
            this._paymentService = paymentService;
            this._productAttributeParser = productAttributeParser;

            this._storeSettings = storeSettings;
            this._templatesSettings = templatesSettings;
            this._emailAccountSettings = emailAccountSettings;
            this._catalogSettings = catalogSettings;
            this._taxSettings = taxSettings;
            this._eventPublisher = eventPublisher;
        }
        public ShoppingCartServiceImpl(Func<ICartRepository> repositoryFactory, IEventPublisher<CartChangeEvent> eventPublisher, IItemService productService, IDynamicPropertyService dynamicPropertyService)
		{
			_repositoryFactory = repositoryFactory;
			_eventPublisher = eventPublisher;
			_productService = productService;
            _dynamicPropertyService = dynamicPropertyService;
        }
        public void Setup()
        {
            var entity1 = new SolutionFeatureConfig
            {
                Id = 1,
                IsForBPSubmission = true
            };

            var entity2 = new SolutionFeatureConfig
            {
                Id = 2,
                IsForBPSubmission = true
            };

            var entity3 = new SolutionFeatureConfig
            {
                Id = 3,
                IsForBPSubmission = false
            };

            var entity4 = new SolutionFeatureConfig
            {
                Id = 4
            };

            var cacheManager = new NopNullCache();
            _eventPublisher = MockRepository.GenerateMock<IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg<object>.Is.Anything));

            _solutionFeatureConfigRepo = MockRepository.GenerateMock<IRepository<SolutionFeatureConfig>>();
            _solutionFeatureConfigRepo.Expect(x => x.Table).Return(new List<SolutionFeatureConfig> { entity1, entity2, entity3, entity4 }.AsQueryable());

            _solutionFeatureConfigService = new SolutionFeatureConfigService(cacheManager, _solutionFeatureConfigRepo, _eventPublisher);
        }
 public WorkflowMessageService(IMessageTemplateService messageTemplateService,
     IQueuedEmailService queuedEmailService,
     ILanguageService languageService,
     ITokenizer tokenizer, 
     IEmailAccountService emailAccountService,
     IMessageTokenProvider messageTokenProvider,
     IStoreService storeService,
     IStoreContext storeContext,
     EmailAccountSettings emailAccountSettings,
     IEventPublisher eventPublisher,
     ISMSSender smsSender,
     SMSSettings smsSettings)
 {
     this._messageTemplateService = messageTemplateService;
     this._queuedEmailService = queuedEmailService;
     this._languageService = languageService;
     this._tokenizer = tokenizer;
     this._emailAccountService = emailAccountService;
     this._messageTokenProvider = messageTokenProvider;
     this._storeService = storeService;
     this._storeContext = storeContext;
     this._emailAccountSettings = emailAccountSettings;
     this._eventPublisher = eventPublisher;
     this._smsSender = smsSender;
     this._smsSettings = smsSettings;
 }
示例#26
0
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="cacheManager">Cache manager</param>
        /// <param name="shippingMethodRepository">Shipping method repository</param>
        /// <param name="logger">Logger</param>
        /// <param name="productAttributeParser">Product attribute parser</param>
        /// <param name="productService">Product service</param>
        /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
        /// <param name="genericAttributeService">Generic attribute service</param>
        /// <param name="localizationService">Localization service</param>
        /// <param name="shippingSettings">Shipping settings</param>
        /// <param name="pluginFinder">Plugin finder</param>
        /// <param name="eventPublisher">Event published</param>
        /// <param name="shoppingCartSettings">Shopping cart settings</param>
        /// <param name="settingService">Setting service</param>
        public ShippingService(ICacheManager cacheManager, 
            IRepository<ShippingMethod> shippingMethodRepository,
            ILogger logger,
            IProductAttributeParser productAttributeParser,
			IProductService productService,
            ICheckoutAttributeParser checkoutAttributeParser,
			IGenericAttributeService genericAttributeService,
            ILocalizationService localizationService,
            ShippingSettings shippingSettings,
            IPluginFinder pluginFinder,
            IEventPublisher eventPublisher,
            ShoppingCartSettings shoppingCartSettings,
			ISettingService settingService,
			IProviderManager providerManager)
        {
            this._cacheManager = cacheManager;
            this._shippingMethodRepository = shippingMethodRepository;
            this._logger = logger;
            this._productAttributeParser = productAttributeParser;
            this._productService = productService;
            this._checkoutAttributeParser = checkoutAttributeParser;
            this._genericAttributeService = genericAttributeService;
            this._localizationService = localizationService;
            this._shippingSettings = shippingSettings;
            this._pluginFinder = pluginFinder;
            this._eventPublisher = eventPublisher;
            this._shoppingCartSettings = shoppingCartSettings;
            this._settingService = settingService;
            this._providerManager = providerManager;
        }
示例#27
0
 public Server(IEventPublisher eventPublisher, IDomainModelStateManager stateManager, ICommandProcessorFactory commandProcessorFactory, IUnitOfWorkFactory unitOfWorkFactory)
 {
     _eventPublisher = eventPublisher;
     _stateManager = stateManager;
     _commandProcessorFactory = commandProcessorFactory;
     _unitOfWorkFactory = unitOfWorkFactory;
 }
示例#28
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="forumGroupRepository">Forum group repository</param>
 /// <param name="forumRepository">Forum repository</param>
 /// <param name="forumTopicRepository">Forum topic repository</param>
 /// <param name="forumPostRepository">Forum post repository</param>
 /// <param name="forumPrivateMessageRepository">Private message repository</param>
 /// <param name="forumSubscriptionRepository">Forum subscription repository</param>
 /// <param name="forumSettings">Forum settings</param>
 /// <param name="customerRepository">Customer repository</param>
 /// <param name="genericAttributeService">Generic attribute service</param>
 /// <param name="customerService">Customer service</param>
 /// <param name="workContext">Work context</param>
 /// <param name="workflowMessageService">Workflow message service</param>
 /// <param name="eventPublisher">Event published</param>
 public ForumService(ICacheManager cacheManager,
     IRepository<ForumGroup> forumGroupRepository,
     IRepository<Forum> forumRepository,
     IRepository<ForumTopic> forumTopicRepository,
     IRepository<ForumPost> forumPostRepository,
     IRepository<PrivateMessage> forumPrivateMessageRepository,
     IRepository<ForumSubscription> forumSubscriptionRepository,
     ForumSettings forumSettings,
     IRepository<Customer> customerRepository,
     IGenericAttributeService genericAttributeService,
     ICustomerService customerService,
     IWorkContext workContext,
     IWorkflowMessageService workflowMessageService,
     IEventPublisher eventPublisher
     )
 {
     this._cacheManager = cacheManager;
     this._forumGroupRepository = forumGroupRepository;
     this._forumRepository = forumRepository;
     this._forumTopicRepository = forumTopicRepository;
     this._forumPostRepository = forumPostRepository;
     this._forumPrivateMessageRepository = forumPrivateMessageRepository;
     this._forumSubscriptionRepository = forumSubscriptionRepository;
     this._forumSettings = forumSettings;
     this._customerRepository = customerRepository;
     this._genericAttributeService = genericAttributeService;
     this._customerService = customerService;
     this._workContext = workContext;
     this._workflowMessageService = workflowMessageService;
     _eventPublisher = eventPublisher;
 }
示例#29
0
 public ExternalAuthorizer(IAuthenticationService authenticationService,
     IOpenAuthenticationService openAuthenticationService,
     IGenericAttributeService genericAttributeService,
     ICustomerRegistrationService customerRegistrationService, 
     ICustomerActivityService customerActivityService, 
     ILocalizationService localizationService,
     IWorkContext workContext,
     IStoreContext storeContext,
     CustomerSettings customerSettings,
     ExternalAuthenticationSettings externalAuthenticationSettings,
     IShoppingCartService shoppingCartService,
     IWorkflowMessageService workflowMessageService,
     IEventPublisher eventPublisher,
     LocalizationSettings localizationSettings)
 {
     this._authenticationService = authenticationService;
     this._openAuthenticationService = openAuthenticationService;
     this._genericAttributeService = genericAttributeService;
     this._customerRegistrationService = customerRegistrationService;
     this._customerActivityService = customerActivityService;
     this._localizationService = localizationService;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._customerSettings = customerSettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._shoppingCartService = shoppingCartService;
     this._workflowMessageService = workflowMessageService;
     this._eventPublisher = eventPublisher;
     this._localizationSettings = localizationSettings;
 }
 public EventStore(
     IEventPublisher publisher,
     IDatabase<EventDescriptors> database)
 {
     _publisher = publisher;
     _database = database;
 }
示例#31
0
 /// <summary>
 /// Ctor
 /// </summary>
 public CameleoProjectCategoryService(IEventPublisher eventPublisher, IRepository <CameleoProjectCategory> projectCategoryRepository, ILocalizationService localizationService)
 {
     _eventPublisher            = eventPublisher;
     _projectCategoryRepository = projectCategoryRepository;
     _localizationService       = localizationService;
 }
示例#32
0
 public PublisherInstance(IEventPublisher instance)
 {
     Instance = instance;
 }
 public SubscriptionService(IStoreService storeService, ICustomerOrderService customerOrderService, ICustomerOrderSearchService customerOrderSearchService, Func <ISubscriptionRepository> subscriptionRepositoryFactory, IUniqueNumberGenerator uniqueNumberGenerator, IEventPublisher eventPublisher, IPlatformMemoryCache platformMemoryCache, ISubscriptionBuilder subscriptionBuilder)
 {
     _storeService                  = storeService;
     _customerOrderService          = customerOrderService;
     _customerOrderSearchService    = customerOrderSearchService;
     _subscriptionRepositoryFactory = subscriptionRepositoryFactory;
     _uniqueNumberGenerator         = uniqueNumberGenerator;
     _eventPublisher                = eventPublisher;
     _platformMemoryCache           = platformMemoryCache;
     _subscriptionBuilder           = subscriptionBuilder;
 }
示例#34
0
 public EventStore(IEventPublisher publisher)
 {
     _publisher = publisher;
 }
示例#35
0
 public OrderManager(IEfBasicRepository <Order> orderRepo
                     , IEventPublisher eventPublisher)
 {
     _orderRepo     = orderRepo;
     _eventPubliser = eventPublisher;
 }
示例#36
0
 public RetryErrorPolicyUseCaseRun(IEventPublisher publisher)
 {
     _publisher = publisher;
 }
示例#37
0
 public ManufacturerTemplateService(IRepository <ManufacturerTemplate> manufacturerTemplateRepository, IEventPublisher eventPublisher)
 {
     _manufacturerTemplateRepository = manufacturerTemplateRepository;
     _eventPublisher = eventPublisher;
 }
 public CreateGameCommandHandler(IGameCommandRepository gameCommandRepository, IEventPublisher eventPublisher)
 {
     _gameCommandRepository = gameCommandRepository;
     _eventPublisher        = eventPublisher;
 }
示例#39
0
        public new void SetUp()
        {
            #region Test data

            //color (dropdownlist)
            pa1 = new ProductAttribute
            {
                Id   = 1,
                Name = "Color",
            };
            pam1_1 = new ProductAttributeMapping
            {
                Id                   = 11,
                ProductId            = 1,
                TextPrompt           = "Select color:",
                IsRequired           = true,
                AttributeControlType = AttributeControlType.DropdownList,
                DisplayOrder         = 1,
                ProductAttribute     = pa1,
                ProductAttributeId   = pa1.Id
            };
            pav1_1 = new ProductAttributeValue
            {
                Id                        = 11,
                Name                      = "Green",
                DisplayOrder              = 1,
                ProductAttributeMapping   = pam1_1,
                ProductAttributeMappingId = pam1_1.Id
            };
            pav1_2 = new ProductAttributeValue
            {
                Id                        = 12,
                Name                      = "Red",
                DisplayOrder              = 2,
                ProductAttributeMapping   = pam1_1,
                ProductAttributeMappingId = pam1_1.Id
            };
            pam1_1.ProductAttributeValues.Add(pav1_1);
            pam1_1.ProductAttributeValues.Add(pav1_2);

            //custom option (checkboxes)
            pa2 = new ProductAttribute
            {
                Id   = 2,
                Name = "Some custom option",
            };
            pam2_1 = new ProductAttributeMapping
            {
                Id                   = 21,
                ProductId            = 1,
                TextPrompt           = "Select at least one option:",
                IsRequired           = true,
                AttributeControlType = AttributeControlType.Checkboxes,
                DisplayOrder         = 2,
                ProductAttribute     = pa2,
                ProductAttributeId   = pa2.Id
            };
            pav2_1 = new ProductAttributeValue
            {
                Id                        = 21,
                Name                      = "Option 1",
                DisplayOrder              = 1,
                ProductAttributeMapping   = pam2_1,
                ProductAttributeMappingId = pam2_1.Id
            };
            pav2_2 = new ProductAttributeValue
            {
                Id                        = 22,
                Name                      = "Option 2",
                DisplayOrder              = 2,
                ProductAttributeMapping   = pam2_1,
                ProductAttributeMappingId = pam2_1.Id
            };
            pam2_1.ProductAttributeValues.Add(pav2_1);
            pam2_1.ProductAttributeValues.Add(pav2_2);

            //custom text
            pa3 = new ProductAttribute
            {
                Id   = 3,
                Name = "Custom text",
            };
            pam3_1 = new ProductAttributeMapping
            {
                Id                   = 31,
                ProductId            = 1,
                TextPrompt           = "Enter custom text:",
                IsRequired           = true,
                AttributeControlType = AttributeControlType.TextBox,
                DisplayOrder         = 1,
                ProductAttribute     = pa1,
                ProductAttributeId   = pa3.Id
            };

            //option radio
            pa4 = new ProductAttribute
            {
                Id   = 4,
                Name = "Radio list",
            };
            pam4_1 = new ProductAttributeMapping
            {
                Id                   = 41,
                ProductId            = 1,
                TextPrompt           = "Select option and enter the quantity:",
                IsRequired           = true,
                AttributeControlType = AttributeControlType.RadioList,
                DisplayOrder         = 2,
                ProductAttribute     = pa4,
                ProductAttributeId   = pa4.Id
            };
            pav4_1 = new ProductAttributeValue
            {
                Id                        = 41,
                Name                      = "Option with quantity",
                DisplayOrder              = 1,
                ProductAttributeMapping   = pam4_1,
                ProductAttributeMappingId = pam4_1.Id
            };

            #endregion

            _productAttributeRepo = MockRepository.GenerateMock <IRepository <ProductAttribute> >();
            _productAttributeRepo.Expect(x => x.Table).Return(new List <ProductAttribute> {
                pa1, pa2, pa3, pa4
            }.AsQueryable());
            _productAttributeRepo.Expect(x => x.GetById(pa1.Id)).Return(pa1);
            _productAttributeRepo.Expect(x => x.GetById(pa2.Id)).Return(pa2);
            _productAttributeRepo.Expect(x => x.GetById(pa3.Id)).Return(pa3);
            _productAttributeRepo.Expect(x => x.GetById(pa4.Id)).Return(pa4);

            _productAttributeMappingRepo = MockRepository.GenerateMock <IRepository <ProductAttributeMapping> >();
            _productAttributeMappingRepo.Expect(x => x.Table).Return(new List <ProductAttributeMapping> {
                pam1_1, pam2_1, pam3_1, pam4_1
            }.AsQueryable());
            _productAttributeMappingRepo.Expect(x => x.GetById(pam1_1.Id)).Return(pam1_1);
            _productAttributeMappingRepo.Expect(x => x.GetById(pam2_1.Id)).Return(pam2_1);
            _productAttributeMappingRepo.Expect(x => x.GetById(pam3_1.Id)).Return(pam3_1);
            _productAttributeMappingRepo.Expect(x => x.GetById(pam4_1.Id)).Return(pam4_1);

            _productAttributeCombinationRepo = MockRepository.GenerateMock <IRepository <ProductAttributeCombination> >();
            _productAttributeCombinationRepo.Expect(x => x.Table).Return(new List <ProductAttributeCombination>().AsQueryable());

            _productAttributeValueRepo = MockRepository.GenerateMock <IRepository <ProductAttributeValue> >();
            _productAttributeValueRepo.Expect(x => x.Table).Return(new List <ProductAttributeValue> {
                pav1_1, pav1_2, pav2_1, pav2_2, pav4_1
            }.AsQueryable());
            _productAttributeValueRepo.Expect(x => x.GetById(pav1_1.Id)).Return(pav1_1);
            _productAttributeValueRepo.Expect(x => x.GetById(pav1_2.Id)).Return(pav1_2);
            _productAttributeValueRepo.Expect(x => x.GetById(pav2_1.Id)).Return(pav2_1);
            _productAttributeValueRepo.Expect(x => x.GetById(pav2_2.Id)).Return(pav2_2);
            _productAttributeValueRepo.Expect(x => x.GetById(pav4_1.Id)).Return(pav4_1);

            _predefinedProductAttributeValueRepo = MockRepository.GenerateMock <IRepository <PredefinedProductAttributeValue> >();

            _eventPublisher = MockRepository.GenerateMock <IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything));

            var cacheManager = new NopNullCache();

            _productAttributeService = new ProductAttributeService(cacheManager,
                                                                   _productAttributeRepo,
                                                                   _productAttributeMappingRepo,
                                                                   _productAttributeCombinationRepo,
                                                                   _productAttributeValueRepo,
                                                                   _predefinedProductAttributeValueRepo,
                                                                   _eventPublisher);

            _context = MockRepository.GenerateMock <IDbContext>();

            _productAttributeParser = new ProductAttributeParser(_context, _productAttributeService);

            _priceCalculationService = MockRepository.GenerateMock <IPriceCalculationService>();

            var workingLanguage = new Language();
            _workContext = MockRepository.GenerateMock <IWorkContext>();
            _workContext.Expect(x => x.WorkingLanguage).Return(workingLanguage);
            _currencyService     = MockRepository.GenerateMock <ICurrencyService>();
            _localizationService = MockRepository.GenerateMock <ILocalizationService>();
            _localizationService.Expect(x => x.GetResource("GiftCardAttribute.For.Virtual")).Return("For: {0} <{1}>");
            _localizationService.Expect(x => x.GetResource("GiftCardAttribute.From.Virtual")).Return("From: {0} <{1}>");
            _localizationService.Expect(x => x.GetResource("GiftCardAttribute.For.Physical")).Return("For: {0}");
            _localizationService.Expect(x => x.GetResource("GiftCardAttribute.From.Physical")).Return("From: {0}");
            _taxService           = MockRepository.GenerateMock <ITaxService>();
            _priceFormatter       = MockRepository.GenerateMock <IPriceFormatter>();
            _downloadService      = MockRepository.GenerateMock <IDownloadService>();
            _webHelper            = MockRepository.GenerateMock <IWebHelper>();
            _shoppingCartSettings = MockRepository.GenerateMock <ShoppingCartSettings>();

            _productAttributeFormatter = new ProductAttributeFormatter(_workContext,
                                                                       _productAttributeService,
                                                                       _productAttributeParser,
                                                                       _currencyService,
                                                                       _localizationService,
                                                                       _taxService,
                                                                       _priceFormatter,
                                                                       _downloadService,
                                                                       _webHelper,
                                                                       _priceCalculationService,
                                                                       _shoppingCartSettings);
        }
示例#40
0
 public MemoryRepository(IEventStore eventStore, IEventPublisher publisher)
 {
     _eventStore = eventStore ?? throw new ArgumentNullException("eventStore");
     _publisher  = publisher ?? throw new ArgumentNullException("publisher");
 }
 /// <summary>
 /// Publishes the order cancelled event.
 /// </summary>
 /// <param name="eventPublisher">The event publisher.</param>
 /// <param name="order">The order.</param>
 public static void PublishOrderCancelled(this IEventPublisher eventPublisher, Order order)
 {
     eventPublisher.Publish(new OrderCancelledEvent(order));
 }
示例#42
0
 public SeoService(Func <ICoreRepository> repositoryFactory, IEventPublisher eventPublisher, IPlatformMemoryCache platformMemoryCache)
 {
     _repositoryFactory   = repositoryFactory;
     _eventPublisher      = eventPublisher;
     _platformMemoryCache = platformMemoryCache;
 }
示例#43
0
        public async Task <CommandHandlingResult> Handle(StartOneToManyOutputsExecutionCommand command, IEventPublisher publisher)
        {
            var asset = await _assetsService.TryGetAssetAsync(command.AssetId);

            if (asset == null)
            {
                throw new InvalidOperationException("Asset not found");
            }

            if (string.IsNullOrWhiteSpace(asset.BlockchainIntegrationLayerId))
            {
                throw new InvalidOperationException("BlockchainIntegrationLayerId of the asset is not configured");
            }

            if (string.IsNullOrWhiteSpace(asset.BlockchainIntegrationLayerAssetId))
            {
                throw new InvalidOperationException("BlockchainIntegrationLayerAssetId of the asset is not configured");
            }

            publisher.PublishEvent
            (
                new OperationExecutionStartedEvent
            {
                OperationId            = command.OperationId,
                FromAddress            = command.FromAddress,
                Outputs                = command.Outputs,
                BlockchainType         = asset.BlockchainIntegrationLayerId,
                BlockchainAssetId      = asset.BlockchainIntegrationLayerAssetId,
                AssetId                = command.AssetId,
                IncludeFee             = command.IncludeFee,
                EndpointsConfiguration = OperationExecutionEndpointsConfiguration.OneToMany
            }
            );

            return(CommandHandlingResult.Ok());
        }
示例#44
0
 protected AbstractCommandHandler(IEventPublisher eventPublisher)
 {
     _eventPublisher = eventPublisher;
 }
 public RecipeMapper(IEventPublisher eventPublisher, IIngredientRepository ingredientRepository)
 {
     _eventPublisher          = eventPublisher;
     _recipeIngredientFactory = new RecipeIngredient.RecipeIngredientFactory(ingredientRepository);
 }
 /// <summary>
 /// Publishes the order paid event.
 /// </summary>
 /// <param name="eventPublisher">The event publisher.</param>
 /// <param name="order">The order.</param>
 public static void PublishOrderPaid(this IEventPublisher eventPublisher, Order order)
 {
     eventPublisher.Publish(new OrderPaidEvent(order));
 }
示例#47
0
 public CommerceMembersServiceImpl(Func <ICustomerRepository> repositoryFactory, IEventPublisher eventPublisher
                                   , IDynamicPropertyService dynamicPropertyService, IPlatformMemoryCache platformMemoryCache, IUserSearchService userSearchService)
     : base(repositoryFactory, eventPublisher, dynamicPropertyService, platformMemoryCache)
 {
     _userSearchService = userSearchService;
 }
示例#48
0
 public AddNewEmployeeService(IGetNewEmployeeInfo getNewEmployeeInfo, IGetEmployeeManager getEmployeeManager, IEventPublisher eventPublisher)
 {
     GetNewEmployeeInfo = getNewEmployeeInfo;
     GetEmployeeManager = getEmployeeManager;
     EventPublisher     = eventPublisher;
 }
示例#49
0
 public static void EntityDeleted <T>(this IEventPublisher eventPublisher, T entity) where T : IDBTable
 {
     eventPublisher.Publish(new EntityDeleted <T>(entity));
 }
 public PaymentPlanServiceImpl(Func <ISubscriptionRepository> subscriptionRepositoryFactory, IEventPublisher eventPublisher)
 {
     _subscriptionRepositoryFactory = subscriptionRepositoryFactory;
     _eventPublisher = eventPublisher;
 }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="categoryTemplateRepository">Category template repository</param>
 /// <param name="eventPublisher">Event published</param>
 public CategoryTemplateService(ICacheManager cacheManager,
                                IRepository <CategoryTemplate> categoryTemplateRepository, IEventPublisher eventPublisher)
 {
     _cacheManager = cacheManager;
     _categoryTemplateRepository = categoryTemplateRepository;
     _eventPublisher             = eventPublisher;
 }
示例#52
0
 public ProgressManager(IEventPublisher eventPublisher)
 {
     _eventPublisher = eventPublisher;
 }
 /// <summary>
 /// Message token added
 /// </summary>
 /// <typeparam name="U">Type</typeparam>
 /// <param name="eventPublisher">Event publisher</param>
 /// <param name="message">Message</param>
 /// <param name="tokens">Tokens</param>
 public static void MessageTokensAdded <U>(this IEventPublisher eventPublisher, MessageTemplate message, System.Collections.Generic.IList <U> tokens)
 {
     eventPublisher.Publish(new MessageTokensAddedEvent <U>(message, tokens));
 }
示例#54
0
 public override void ReleaseFrom(IEventPublisher eventPublisher)
 {
     base.ReleaseFrom(eventPublisher);
     _allSelectionPresenter.Each(p => p.ReleaseFrom(eventPublisher));
     _allSelectionPresenter.Clear();
 }
 /// <summary>
 /// Publishes the newsletter unsubscribe event.
 /// </summary>
 /// <param name="eventPublisher">The event publisher.</param>
 /// <param name="subscription">The newsletter subscription.</param>
 public static void PublishNewsletterUnsubscribe(this IEventPublisher eventPublisher, NewsLetterSubscription subscription)
 {
     eventPublisher.Publish(new EmailUnsubscribedEvent(subscription));
 }
 public NewsLetterSubscriptionService(IDbContext context, IRepository <NewsLetterSubscription> subscriptionRepository, IEventPublisher eventPublisher)
 {
     _context = context;
     _subscriptionRepository = subscriptionRepository;
     _eventPublisher         = eventPublisher;
 }
 public MoBiHistoryManager(IMoBiContext executionContext, IExceptionManager exceptionManager, IEventPublisher eventPublisher)
     : base(executionContext, eventPublisher, exceptionManager, new HistoryItemFactory(), new RollBackCommandFactory())
 {
     _context = executionContext;
 }
 /// <summary>
 /// Entity tokens added
 /// </summary>
 /// <typeparam name="T">Type</typeparam>
 /// <typeparam name="U">Type</typeparam>
 /// <param name="eventPublisher">Event publisher</param>
 /// <param name="entity">Entity</param>
 /// <param name="tokens">Tokens</param>
 public static void EntityTokensAdded <T, U>(this IEventPublisher eventPublisher, T entity, System.Collections.Generic.IList <U> tokens) where T : BaseEntity
 {
     eventPublisher.Publish(new EntityTokensAddedEvent <T, U>(entity, tokens));
 }
        public new void SetUp()
        {
            _customerSettings = new CustomerSettings();
            _securitySettings = new SecuritySettings()
            {
                EncryptionKey = "273ece6f97dd844d"
            };
            _rewardPointsSettings = new RewardPointsSettings()
            {
                Enabled = false,
            };

            _encryptionService = new EncryptionService(_securitySettings);
            _customerRepo      = MockRepository.GenerateMock <IRepository <Customer> >();
            var customer1 = new Customer()
            {
                Username       = "******",
                Email          = "*****@*****.**",
                PasswordFormat = PasswordFormat.Hashed,
                Active         = true
            };

            string saltKey  = _encryptionService.CreateSaltKey(5);
            string password = _encryptionService.CreatePasswordHash("password", saltKey);

            customer1.PasswordSalt = saltKey;
            customer1.Password     = password;
            AddCustomerToRegisteredRole(customer1);

            var customer2 = new Customer()
            {
                Username       = "******",
                Email          = "*****@*****.**",
                PasswordFormat = PasswordFormat.Clear,
                Password       = "******",
                Active         = true
            };

            AddCustomerToRegisteredRole(customer2);

            var customer3 = new Customer()
            {
                Username       = "******",
                Email          = "*****@*****.**",
                PasswordFormat = PasswordFormat.Encrypted,
                Password       = _encryptionService.EncryptText("password"),
                Active         = true
            };

            AddCustomerToRegisteredRole(customer3);

            var customer4 = new Customer()
            {
                Username       = "******",
                Email          = "*****@*****.**",
                PasswordFormat = PasswordFormat.Clear,
                Password       = "******",
                Active         = true
            };

            AddCustomerToRegisteredRole(customer4);

            var customer5 = new Customer()
            {
                Username       = "******",
                Email          = "*****@*****.**",
                PasswordFormat = PasswordFormat.Clear,
                Password       = "******",
                Active         = true
            };

            _eventPublisher = MockRepository.GenerateMock <IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything));

            _customerRepo.Expect(x => x.Table).Return(new List <Customer>()
            {
                customer1, customer2, customer3, customer4, customer5
            }.AsQueryable());

            _customerRoleRepo     = MockRepository.GenerateMock <IRepository <CustomerRole> >();
            _genericAttributeRepo = MockRepository.GenerateMock <IRepository <GenericAttribute> >();
            _orderRepo            = MockRepository.GenerateMock <IRepository <Order> >();
            _forumPostRepo        = MockRepository.GenerateMock <IRepository <ForumPost> >();
            _forumTopicRepo       = MockRepository.GenerateMock <IRepository <ForumTopic> >();

            _genericAttributeService       = MockRepository.GenerateMock <IGenericAttributeService>();
            _newsLetterSubscriptionService = MockRepository.GenerateMock <INewsLetterSubscriptionService>();

            _localizationService = MockRepository.GenerateMock <ILocalizationService>();
            _customerService     = new CustomerService(new NasNullCache(), _customerRepo, _customerRoleRepo,
                                                       _genericAttributeRepo, _orderRepo, _forumPostRepo, _forumTopicRepo,
                                                       null, null, null, null, null,
                                                       _genericAttributeService, _eventPublisher, _customerSettings);
            _customerRegistrationService = new CustomerRegistrationService(_customerService,
                                                                           _encryptionService, _newsLetterSubscriptionService, _localizationService,
                                                                           _rewardPointsSettings, _customerSettings);
        }
 public CouponService(Func <IMarketingRepository> repositoryFactory, IEventPublisher eventPublisher, IPlatformMemoryCache platformMemoryCache)
 {
     _repositoryFactory   = repositoryFactory;
     _eventPublisher      = eventPublisher;
     _platformMemoryCache = platformMemoryCache;
 }