コード例 #1
0
        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);
        }
コード例 #2
0
 public WebWorkContext(HttpContextBase httpContext,
     ICustomerService customerService,
     IVendorService vendorService,
     IStoreContext storeContext,
     IAuthenticationService authenticationService,
     ILanguageService languageService,
     ICurrencyService currencyService,
     IGenericAttributeService genericAttributeService,
     TaxSettings taxSettings, 
     CurrencySettings currencySettings,
     LocalizationSettings localizationSettings,
     IUserAgentHelper userAgentHelper,
     IStoreMappingService storeMappingService)
 {
     this._httpContext = httpContext;
     this._customerService = customerService;
     this._vendorService = vendorService;
     this._storeContext = storeContext;
     this._authenticationService = authenticationService;
     this._languageService = languageService;
     this._currencyService = currencyService;
     this._genericAttributeService = genericAttributeService;
     this._taxSettings = taxSettings;
     this._currencySettings = currencySettings;
     this._localizationSettings = localizationSettings;
     this._userAgentHelper = userAgentHelper;
     this._storeMappingService = storeMappingService;
 }
コード例 #3
0
ファイル: BlogController.cs プロジェクト: priceLiu/MulitNop
        public BlogController(IBlogService blogService, 
            IWorkContext workContext, IPictureService pictureService, ILocalizationService localizationService,
            ICustomerContentService customerContentService, IDateTimeHelper dateTimeHelper,
            IWorkflowMessageService workflowMessageService, IWebHelper webHelper,
            ICacheManager cacheManager, ICustomerActivityService customerActivityService,
            MediaSettings mediaSettings, BlogSettings blogSettings,
            LocalizationSettings localizationSettings, CustomerSettings customerSettings,
            StoreInformationSettings storeInformationSettings, CaptchaSettings captchaSettings)
        {
            this._blogService = blogService;
            this._workContext = workContext;
            this._pictureService = pictureService;
            this._localizationService = localizationService;
            this._customerContentService = customerContentService;
            this._dateTimeHelper = dateTimeHelper;
            this._workflowMessageService = workflowMessageService;
            this._webHelper = webHelper;
            this._cacheManager = cacheManager;
            this._customerActivityService = customerActivityService;

            this._mediaSettings = mediaSettings;
            this._blogSettings = blogSettings;
            this._localizationSettings = localizationSettings;
            this._customerSettings = customerSettings;
            this._storeInformationSettings = storeInformationSettings;
            this._captchaSettings = captchaSettings;
        }
コード例 #4
0
ファイル: OrderController.cs プロジェクト: pquic/qCommerce
        public OrderController(IOrderService orderService, IWorkContext workContext,
            ICurrencyService currencyService, IPriceFormatter priceFormatter,
            IOrderProcessingService orderProcessingService,
            IDateTimeHelper dateTimeHelper, IMeasureService measureService,
            IPaymentService paymentService, ILocalizationService localizationService,
            IPdfService pdfService, ICustomerService customerService,
            IWorkflowMessageService workflowMessageService, 
            LocalizationSettings localizationSettings,
            MeasureSettings measureSettings, CatalogSettings catalogSettings,
            OrderSettings orderSettings, TaxSettings taxSettings, PdfSettings pdfSettings)
        {
            this._orderService = orderService;
            this._workContext = workContext;
            this._currencyService = currencyService;
            this._priceFormatter = priceFormatter;
            this._orderProcessingService = orderProcessingService;
            this._dateTimeHelper = dateTimeHelper;
            this._measureService = measureService;
            this._paymentService = paymentService;
            this._localizationService = localizationService;
            this._pdfService = pdfService;
            this._customerService = customerService;
            this._workflowMessageService = workflowMessageService;

            this._localizationSettings = localizationSettings;
            this._measureSettings = measureSettings;
            this._catalogSettings = catalogSettings;
            this._orderSettings = orderSettings;
            this._taxSettings = taxSettings;
            this._pdfSettings = pdfSettings;
        }
コード例 #5
0
        public NewsController(INewsService newsService, 
            IWorkContext workContext, IStoreContext storeContext, 
            IPictureService pictureService, ILocalizationService localizationService,
            IDateTimeHelper dateTimeHelper,
            IWorkflowMessageService workflowMessageService, IWebHelper webHelper,
            ICacheManager cacheManager, ICustomerActivityService customerActivityService,
            IStoreMappingService storeMappingService,
            MediaSettings mediaSettings, NewsSettings newsSettings,
            LocalizationSettings localizationSettings, CustomerSettings customerSettings,
            CaptchaSettings captchaSettings)
        {
            this._newsService = newsService;
            this._workContext = workContext;
            this._storeContext = storeContext;
            this._pictureService = pictureService;
            this._localizationService = localizationService;
            this._dateTimeHelper = dateTimeHelper;
            this._workflowMessageService = workflowMessageService;
            this._webHelper = webHelper;
            this._cacheManager = cacheManager;
            this._customerActivityService = customerActivityService;
            this._storeMappingService = storeMappingService;

            this._mediaSettings = mediaSettings;
            this._newsSettings = newsSettings;
            this._localizationSettings = localizationSettings;
            this._customerSettings = customerSettings;
            this._captchaSettings = captchaSettings;
        }
コード例 #6
0
        public VendorController(IWorkContext workContext,
            ILocalizationService localizationService,
            ICustomerService customerService,
            IWorkflowMessageService workflowMessageService,
            IVendorService vendorService,
            IUrlRecordService urlRecordService,
            IPictureService pictureService,
            LocalizationSettings localizationSettings,
            VendorSettings vendorSettings,
            CaptchaSettings captchaSettings,
            MediaSettings mediaSettings)
        {
            this._workContext = workContext;
            this._localizationService = localizationService;
            this._customerService = customerService;
            this._workflowMessageService = workflowMessageService;
            this._vendorService = vendorService;
            this._urlRecordService = urlRecordService;
            this._pictureService = pictureService;

            this._localizationSettings = localizationSettings;
            this._vendorSettings = vendorSettings;
            this._captchaSettings = captchaSettings;
            this._mediaSettings = mediaSettings;
        }
コード例 #7
0
        public ReturnRequestController(IOrderService orderService, 
            IWorkContext workContext, 
            IStoreContext storeContext,
            ICurrencyService currencyService, 
            IPriceFormatter priceFormatter,
            IOrderProcessingService orderProcessingService,
            ILocalizationService localizationService,
            ICustomerService customerService,
            IWorkflowMessageService workflowMessageService,
            IDateTimeHelper dateTimeHelper,
            LocalizationSettings localizationSettings,
            OrderSettings orderSettings)
        {
            this._orderService = orderService;
            this._workContext = workContext;
            this._storeContext = storeContext;
            this._currencyService = currencyService;
            this._priceFormatter = priceFormatter;
            this._orderProcessingService = orderProcessingService;
            this._localizationService = localizationService;
            this._customerService = customerService;
            this._workflowMessageService = workflowMessageService;
            this._dateTimeHelper = dateTimeHelper;

            this._localizationSettings = localizationSettings;
            this._orderSettings = orderSettings;
        }
コード例 #8
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;
 }
コード例 #9
0
 public RobotsTxtManager(
     ISettingService settingService,
     ILocalizationService localizationService,
     LocalizationSettings localizationSettings,
     IStoreContext storeContext,
     ILanguageService languageService,
     IBlogService blogService,
     INewsService newsService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     ITopicService topicService,
     IVendorService vendorService,
     IProductService productService)
 {
     _settingService = settingService;
     _localizationService = localizationService;
     _localizationSettings = localizationSettings;
     _storeContext = storeContext;
     _languageService = languageService;
     _blogService = blogService;
     _newsService = newsService;
     _categoryService = categoryService;
     _manufacturerService = manufacturerService;
     _topicService = topicService;
     _vendorService = vendorService;
     _productService = productService;
     _storeId = _storeContext.CurrentStore.Id;
     _languages = _languageService.GetAllLanguages(storeId: _storeId);
 }
コード例 #10
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="logger">Logger</param>
 /// <param name="workContext">Work context</param>
 /// <param name="lsrRepository">Locale string resource repository</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="eventPublisher"></param>
 public LocalizationService(ICacheManager cacheManager,
     ILogger logger, IWorkContext workContext,
     IRepository<LocaleStringResource> lsrRepository, LocalizationSettings localizationSettings, IEventPublisher eventPublisher)
 {
     _cacheManager = cacheManager;
     _logger = logger;
     _workContext = workContext;
     _lsrRepository = lsrRepository;
     _localizationSettings = localizationSettings;
     _eventPublisher = eventPublisher;
 }
コード例 #11
0
 public MtProductService(ICacheManager cacheManager,
     IRepository<Product> productRepository,
     IRepository<RelatedProduct> relatedProductRepository,
     IRepository<CrossSellProduct> crossSellProductRepository,
     IRepository<TierPrice> tierPriceRepository,
     IRepository<ProductPicture> productPictureRepository,
     IRepository<LocalizedProperty> localizedPropertyRepository,
     IRepository<AclRecord> aclRepository,
     IRepository<StoreMapping> storeMappingRepository,
     IRepository<ProductSpecificationAttribute> productSpecificationAttributeRepository,
     IRepository<ProductReview> productReviewRepository,
     IRepository<ProductWarehouseInventory> productWarehouseInventoryRepository,
     IProductAttributeService productAttributeService,
     IProductAttributeParser productAttributeParser,
     ILanguageService languageService,
     IWorkflowMessageService workflowMessageService,
     IDataProvider dataProvider,
     IDbContext dbContext,
     IWorkContext workContext,
     IStoreContext storeContext,
     LocalizationSettings localizationSettings,
     CommonSettings commonSettings,
     CatalogSettings catalogSettings,
     IEventPublisher eventPublisher,
     IAclService aclService,
     IStoreMappingService storeMappingService)
 {
     this._cacheManager = cacheManager;
     this._productRepository = productRepository;
     this._relatedProductRepository = relatedProductRepository;
     this._crossSellProductRepository = crossSellProductRepository;
     this._tierPriceRepository = tierPriceRepository;
     this._productPictureRepository = productPictureRepository;
     this._localizedPropertyRepository = localizedPropertyRepository;
     this._aclRepository = aclRepository;
     this._storeMappingRepository = storeMappingRepository;
     this._productSpecificationAttributeRepository = productSpecificationAttributeRepository;
     this._productReviewRepository = productReviewRepository;
     this._productWarehouseInventoryRepository = productWarehouseInventoryRepository;
     this._productAttributeService = productAttributeService;
     this._productAttributeParser = productAttributeParser;
     this._languageService = languageService;
     this._workflowMessageService = workflowMessageService;
     this._dataProvider = dataProvider;
     this._dbContext = dbContext;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._localizationSettings = localizationSettings;
     this._commonSettings = commonSettings;
     this._catalogSettings = catalogSettings;
     this._eventPublisher = eventPublisher;
     this._aclService = aclService;
     this._storeMappingService = storeMappingService;
 }
コード例 #12
0
 public ReturnRequestController(IReturnRequestService returnRequestService, 
     IOrderService orderService,
     ICustomerService customerService, IDateTimeHelper dateTimeHelper,
     ILocalizationService localizationService, IWorkContext workContext,
     IWorkflowMessageService workflowMessageService, LocalizationSettings localizationSettings,
     ICustomerActivityService customerActivityService, IPermissionService permissionService)
     : base(returnRequestService, orderService, customerService, 
           dateTimeHelper, localizationService, 
           workContext, workflowMessageService, 
           localizationSettings, customerActivityService, permissionService)
 {  }
コード例 #13
0
ファイル: LanguageService.cs プロジェクト: cmcginn/StoreFront
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="languageRepository">Language repository</param>
 /// <param name="settingService">Setting service</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="eventPublisher"></param>
 public LanguageService(ICacheManager cacheManager,
     IRepository<Language> languageRepository,
     ISettingService settingService,
     LocalizationSettings localizationSettings,
     IEventPublisher eventPublisher)
 {
     _cacheManager = cacheManager;
     _languageRepository = languageRepository;
     _settingService = settingService;
     _localizationSettings = localizationSettings;
     _eventPublisher = eventPublisher;
 }
コード例 #14
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="languageRepository">Language repository</param>
 /// <param name="customerService">Customer service</param>
 /// <param name="settingService">Setting service</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="eventPublisher">Event published</param>
 public LanguageService(ICacheManager cacheManager,
     IRepository<Language> languageRepository,
     ICustomerService customerService,
     ISettingService settingService,
     LocalizationSettings localizationSettings,
     IEventPublisher eventPublisher)
 {
     this._cacheManager = cacheManager;
     this._languageRepository = languageRepository;
     this._customerService = customerService;
     this._settingService = settingService;
     this._localizationSettings = localizationSettings;
     this._eventPublisher = eventPublisher;
 }
コード例 #15
0
 public ReturnRequestController(IOrderService orderService,
     ICustomerService customerService, IDateTimeHelper dateTimeHelper,
     ILocalizationService localizationService, IWorkContext workContext,
     IWorkflowMessageService workflowMessageService, LocalizationSettings localizationSettings,
     ICustomerActivityService customerActivityService, IPermissionService permissionService)
 {
     this._orderService = orderService;
     this._customerService = customerService;
     this._dateTimeHelper = dateTimeHelper;
     this._localizationService = localizationService;
     this._workContext = workContext;
     this._workflowMessageService = workflowMessageService;
     this._localizationSettings = localizationSettings;
     this._customerActivityService = customerActivityService;
     this._permissionService = permissionService;
 }
コード例 #16
0
 public GiftCardController(IGiftCardService giftCardService,
     IPriceFormatter priceFormatter, IWorkflowMessageService workflowMessageService,
     IDateTimeHelper dateTimeHelper, LocalizationSettings localizationSettings,
     ICurrencyService currencyService, CurrencySettings currencySettings,
     ILocalizationService localizationService, ICustomerActivityService customerActivityService,
     IPermissionService permissionService)
 {
     this._giftCardService = giftCardService;
     this._priceFormatter = priceFormatter;
     this._workflowMessageService = workflowMessageService;
     this._dateTimeHelper = dateTimeHelper;
     this._localizationSettings = localizationSettings;
     this._currencyService = currencyService;
     this._currencySettings = currencySettings;
     this._localizationService = localizationService;
     this._customerActivityService = customerActivityService;
     this._permissionService = permissionService;
 }
コード例 #17
0
 public ExternalAuthorizer(IAuthenticationService authenticationService,
     IOpenAuthenticationService openAuthenticationService,
     ICustomerService customerService, IWorkContext workContext,
     CustomerSettings customerSettings,
     ExternalAuthenticationSettings externalAuthenticationSettings,
     IShoppingCartService shoppingCartService,
     IWorkflowMessageService workflowMessageService, LocalizationSettings localizationSettings)
 {
     this._authenticationService = authenticationService;
     this._openAuthenticationService = openAuthenticationService;
     this._customerService = customerService;
     this._workContext = workContext;
     this._customerSettings = customerSettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._shoppingCartService = shoppingCartService;
     this._workflowMessageService = workflowMessageService;
     this._localizationSettings = localizationSettings;
 }
コード例 #18
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="logger">Logger</param>
 /// <param name="workContext">Work context</param>
 /// <param name="lsrRepository">Locale string resource repository</param>
 /// <param name="languageService">Language service</param>
 /// <param name="dataProvider">Data provider</param>
 /// <param name="dbContext">Database Context</param>
 /// <param name="commonSettings">Common settings</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="eventPublisher">Event published</param>
 public LocalizationService(ICacheManager cacheManager,
     ILogger logger, IWorkContext workContext,
     IRepository<LocaleStringResource> lsrRepository, 
     ILanguageService languageService,
     IDataProvider dataProvider, IDbContext dbContext, CommonSettings commonSettings,
     LocalizationSettings localizationSettings, IEventPublisher eventPublisher)
 {
     this._cacheManager = cacheManager;
     this._logger = logger;
     this._workContext = workContext;
     this._lsrRepository = lsrRepository;
     this._languageService = languageService;
     this._dataProvider = dataProvider;
     this._dbContext = dbContext;
     this._commonSettings = commonSettings;
     this._localizationSettings = localizationSettings;
     this._eventPublisher = eventPublisher;
 }
コード例 #19
0
        public VendorController(IWorkContext workContext, 
            ILocalizationService localizationService,
            ICustomerService customerService,
            IWorkflowMessageService workflowMessageService,
            IVendorService vendorService,
            IUrlRecordService urlRecordService,
            LocalizationSettings localizationSettings,
            VendorSettings vendorSettings)
        {
            this._workContext = workContext;
            this._localizationService = localizationService;
            this._customerService = customerService;
            this._workflowMessageService = workflowMessageService;
            this._vendorService = vendorService;
            this._urlRecordService = urlRecordService;

            this._localizationSettings = localizationSettings;
            this._vendorSettings = vendorSettings;
        }
コード例 #20
0
 public RobotsTxtController(ISettingService settingService,
     ILocalizationService localizationService,
     LocalizationSettings localizationSettings,
     IStoreContext storeContext,
     ILanguageService languageService,
     IBlogService blogService,
     INewsService newsService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     ITopicService topicService,
     IVendorService vendorService,
     IProductService productService)
 {
     _manager = new RobotsTxtManager(settingService, localizationService, localizationSettings,
         storeContext, languageService, blogService, newsService, categoryService, manufacturerService,
         topicService, vendorService, productService);
     _localizationService = localizationService;
     _settingService = settingService;
 }
コード例 #21
0
 public WebWorkContext(HttpContextBase httpContext,
     ICustomerService customerService,
     IAuthenticationService authenticationService,
     ILanguageService languageService,
     ICurrencyService currencyService,
     TaxSettings taxSettings, CurrencySettings currencySettings,
     LocalizationSettings localizationSettings,
     IWebHelper webHelper)
 {
     this._httpContext = httpContext;
     this._customerService = customerService;
     this._authenticationService = authenticationService;
     this._languageService = languageService;
     this._currencyService = currencyService;
     this._taxSettings = taxSettings;
     this._currencySettings = currencySettings;
     this._localizationSettings = localizationSettings;
     this._webHelper = webHelper;
 }
コード例 #22
0
        public CommonController(ICategoryService categoryService, IProductService productService,
            IManufacturerService manufacturerService, ITopicService topicService,
            ILanguageService languageService,
            ICurrencyService currencyService, ILocalizationService localizationService,
            IWorkContext workContext,
            IQueuedEmailService queuedEmailService, IEmailAccountService emailAccountService,
            ISitemapGenerator sitemapGenerator, IThemeContext themeContext,
            IThemeProvider themeProvider, IForumService forumService,
            ICustomerService customerService, IWebHelper webHelper,
            IPermissionService permissionService, CustomerSettings customerSettings,
            TaxSettings taxSettings, CatalogSettings catalogSettings,
            StoreInformationSettings storeInformationSettings, EmailAccountSettings emailAccountSettings,
            CommonSettings commonSettings, BlogSettings blogSettings, ForumSettings forumSettings,
            LocalizationSettings localizationSettings)
        {
            this._categoryService = categoryService;
            this._productService = productService;
            this._manufacturerService = manufacturerService;
            this._topicService = topicService;
            this._languageService = languageService;
            this._currencyService = currencyService;
            this._localizationService = localizationService;
            this._workContext = workContext;
            this._queuedEmailService = queuedEmailService;
            this._emailAccountService = emailAccountService;
            this._sitemapGenerator = sitemapGenerator;
            this._themeContext = themeContext;
            this._themeProvider = themeProvider;
            this._forumservice = forumService;
            this._customerService = customerService;
            this._webHelper = webHelper;
            this._permissionService = permissionService;

            this._customerSettings = customerSettings;
            this._taxSettings = taxSettings;
            this._catalogSettings = catalogSettings;
            this._storeInformationSettings = storeInformationSettings;
            this._emailAccountSettings = emailAccountSettings;
            this._commonSettings = commonSettings;
            this._blogSettings = blogSettings;
            this._forumSettings = forumSettings;
            this._localizationSettings = localizationSettings;
        }
 public ExtendedVendorController(IExtendedVendorService extendedVendorService,
     IPermissionService permissionService,
     IPictureService pictureService,
     IVendorService vendorService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     ICacheManager cacheManager,
     ILocalizationService localizationService,
     IWorkContext workContext,
     IOrderService orderService,
     IProductService productService,
     CatalogSettings catalogSettings,
     IWorkflowMessageService workflowMessageService,
     ICustomerActivityService customerActivityService,
     LocalizationSettings localizationSettings,
     ISettingService settingService,
     IStoreService storeService,
     ICustomerService customerService)
 {
     this._extendedVendorService = extendedVendorService;
     this._permissionService = permissionService;
     this._pictureService = pictureService;
     this._vendorService = vendorService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._cacheManager = cacheManager;
     this._localizationService = localizationService;
     this._workContext = workContext;
     this._orderService = orderService;
     this._productService = productService;
     this._catalogSettings = catalogSettings;
     this._workflowMessageService = workflowMessageService;
     this._customerActivityService = customerActivityService;
     this._localizationSettings = localizationSettings;
     this._settingService = settingService;
     this._storeService = storeService;
     this._customerService = customerService;
 }
コード例 #24
0
ファイル: NewsController.cs プロジェクト: CCSW/desnivell
        public NewsController(INewsService newsService, 
            IWorkContext workContext, IPictureService pictureService, ILocalizationService localizationService,
            ICustomerContentService customerContentService, IDateTimeHelper dateTimeHelper,
            IWorkflowMessageService workflowMessageService, IWebHelper webHelper,
            MediaSettings mediaSettings, NewsSettings newsSettings,
            LocalizationSettings localizationSettings, CustomerSettings customerSettings,
            StoreInformationSettings storeInformationSettings)
        {
            this._newsService = newsService;
            this._workContext = workContext;
            this._pictureService = pictureService;
            this._localizationService = localizationService;
            this._customerContentService = customerContentService;
            this._dateTimeHelper = dateTimeHelper;
            this._workflowMessageService = workflowMessageService;
            this._webHelper = webHelper;

            this._mediaSettings = mediaSettings;
            this._newsSettings = newsSettings;
            this._localizationSettings = localizationSettings;
            this._customerSettings = customerSettings;
            this._storeInformationSettings = storeInformationSettings;
        }
コード例 #25
0
        public new void SetUp()
        {
            _workContext = null;

            var pluginFinder = new PluginFinder();
            var cacheManager = new NopNullCache();

            _shoppingCartSettings = new ShoppingCartSettings();
            _catalogSettings = new CatalogSettings();

            //price calculation service
            _discountService = MockRepository.GenerateMock<IDiscountService>();
            _categoryService = MockRepository.GenerateMock<ICategoryService>();
            _productAttributeParser = MockRepository.GenerateMock<IProductAttributeParser>();
            _priceCalcService = new PriceCalculationService(_workContext, _discountService,
                _categoryService, _productAttributeParser, _shoppingCartSettings, _catalogSettings);

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

            _localizationService = MockRepository.GenerateMock<ILocalizationService>();

            //shipping
            _shippingSettings = new ShippingSettings();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List<string>();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");
            _shippingMethodRepository = MockRepository.GenerateMock<IRepository<ShippingMethod>>();
            _logger = new NullLogger();
            _shippingService = new ShippingService(cacheManager,
                _shippingMethodRepository,
                _logger,
                _productAttributeParser,
                _checkoutAttributeParser,
                _localizationService,
                _shippingSettings, pluginFinder,
                _eventPublisher, _shoppingCartSettings);
            _shipmentService = MockRepository.GenerateMock<IShipmentService>();

            _paymentService = MockRepository.GenerateMock<IPaymentService>();
            _checkoutAttributeParser = MockRepository.GenerateMock<ICheckoutAttributeParser>();
            _giftCardService = MockRepository.GenerateMock<IGiftCardService>();
            _genericAttributeService = MockRepository.GenerateMock<IGenericAttributeService>();

            //tax
            _taxSettings = new TaxSettings();
            _taxSettings.ShippingIsTaxable = true;
            _taxSettings.PaymentMethodAdditionalFeeIsTaxable = true;
            _taxSettings.DefaultTaxAddressId = 10;
            _addressService = MockRepository.GenerateMock<IAddressService>();
            _addressService.Expect(x => x.GetAddressById(_taxSettings.DefaultTaxAddressId)).Return(new Address() { Id = _taxSettings.DefaultTaxAddressId });
            _taxService = new TaxService(_addressService, _workContext, _taxSettings, pluginFinder);

            _rewardPointsSettings = new RewardPointsSettings();

            _orderTotalCalcService = new OrderTotalCalculationService(_workContext,
                _priceCalcService, _taxService, _shippingService, _paymentService,
                _checkoutAttributeParser, _discountService, _giftCardService,
                _genericAttributeService,
                _taxSettings, _rewardPointsSettings, _shippingSettings, _shoppingCartSettings, _catalogSettings);

            _orderService = MockRepository.GenerateMock<IOrderService>();
            _webHelper = MockRepository.GenerateMock<IWebHelper>();
            _languageService = MockRepository.GenerateMock<ILanguageService>();
            _productService = MockRepository.GenerateMock<IProductService>();
            _priceFormatter= MockRepository.GenerateMock<IPriceFormatter>();
            _productAttributeFormatter= MockRepository.GenerateMock<IProductAttributeFormatter>();
            _shoppingCartService= MockRepository.GenerateMock<IShoppingCartService>();
            _checkoutAttributeFormatter= MockRepository.GenerateMock<ICheckoutAttributeFormatter>();
            _customerService= MockRepository.GenerateMock<ICustomerService>();
            _encryptionService = MockRepository.GenerateMock<IEncryptionService>();
            _workflowMessageService = MockRepository.GenerateMock<IWorkflowMessageService>();
            _customerActivityService = MockRepository.GenerateMock<ICustomerActivityService>();
            _currencyService = MockRepository.GenerateMock<ICurrencyService>();

            _paymentSettings = new PaymentSettings()
            {
                ActivePaymentMethodSystemNames = new List<string>()
                {
                    "Payments.TestMethod"
                }
            };
            _orderSettings = new OrderSettings();

            _localizationSettings = new LocalizationSettings();

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

            _currencySettings = new CurrencySettings();

            _orderProcessingService = new OrderProcessingService(_orderService, _webHelper,
                _localizationService, _languageService,
                _productService, _paymentService, _logger,
                _orderTotalCalcService, _priceCalcService, _priceFormatter,
                _productAttributeParser, _productAttributeFormatter,
                _giftCardService, _shoppingCartService, _checkoutAttributeFormatter,
                _shippingService, _shipmentService, _taxService,
                _customerService, _discountService,
                _encryptionService, _workContext, _workflowMessageService,
                _customerActivityService, _currencyService,
                _eventPublisher, _paymentSettings, _rewardPointsSettings,
                _orderSettings, _taxSettings, _localizationSettings,
                _currencySettings);
        }
コード例 #26
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="orderService">Order service</param>
 /// <param name="webHelper">Web helper</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="languageService">Language service</param>
 /// <param name="productService">Product service</param>
 /// <param name="paymentService">Payment service</param>
 /// <param name="logger">Logger</param>
 /// <param name="orderTotalCalculationService">Order total calculationservice</param>
 /// <param name="priceCalculationService">Price calculation service</param>
 /// <param name="priceFormatter">Price formatter</param>
 /// <param name="productAttributeParser">Product attribute parser</param>
 /// <param name="productAttributeFormatter">Product attribute formatter</param>
 /// <param name="giftCardService">Gift card service</param>
 /// <param name="shoppingCartService">Shopping cart service</param>
 /// <param name="checkoutAttributeFormatter">Checkout attribute service</param>
 /// <param name="shippingService">Shipping service</param>
 /// <param name="shipmentService">Shipment service</param>
 /// <param name="taxService">Tax service</param>
 /// <param name="customerService">Customer service</param>
 /// <param name="discountService">Discount service</param>
 /// <param name="encryptionService">Encryption service</param>
 /// <param name="workContext">Work context</param>
 /// <param name="workflowMessageService">Workflow message service</param>
 /// <param name="vendorService">Vendor service</param>
 /// <param name="customerActivityService">Customer activity service</param>
 /// <param name="currencyService">Currency service</param>
 /// <param name="affiliateService">Affiliate service</param>
 /// <param name="eventPublisher">Event published</param>
 /// <param name="pdfService">PDF service</param>
 /// <param name="paymentSettings">Payment settings</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="orderSettings">Order settings</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="currencySettings">Currency settings</param>
 public OrderProcessingService(IOrderService orderService,
     IWebHelper webHelper,
     ILocalizationService localizationService,
     ILanguageService languageService,
     IProductService productService,
     IPaymentService paymentService,
     ILogger logger,
     IOrderTotalCalculationService orderTotalCalculationService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     IProductAttributeParser productAttributeParser,
     IProductAttributeFormatter productAttributeFormatter,
     IGiftCardService giftCardService,
     IShoppingCartService shoppingCartService,
     ICheckoutAttributeFormatter checkoutAttributeFormatter,
     IShippingService shippingService,
     IShipmentService shipmentService,
     ITaxService taxService,
     ICustomerService customerService,
     IDiscountService discountService,
     IEncryptionService encryptionService,
     IWorkContext workContext,
     IWorkflowMessageService workflowMessageService,
     IVendorService vendorService,
     ICustomerActivityService customerActivityService,
     ICurrencyService currencyService,
     IAffiliateService affiliateService,
     IEventPublisher eventPublisher,
     IPdfService pdfService,
     ShippingSettings shippingSettings,
     PaymentSettings paymentSettings,
     RewardPointsSettings rewardPointsSettings,
     OrderSettings orderSettings,
     TaxSettings taxSettings,
     LocalizationSettings localizationSettings,
     CurrencySettings currencySettings)
 {
     this._orderService = orderService;
     this._webHelper = webHelper;
     this._localizationService = localizationService;
     this._languageService = languageService;
     this._productService = productService;
     this._paymentService = paymentService;
     this._logger = logger;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._priceCalculationService = priceCalculationService;
     this._priceFormatter = priceFormatter;
     this._productAttributeParser = productAttributeParser;
     this._productAttributeFormatter = productAttributeFormatter;
     this._giftCardService = giftCardService;
     this._shoppingCartService = shoppingCartService;
     this._checkoutAttributeFormatter = checkoutAttributeFormatter;
     this._workContext = workContext;
     this._workflowMessageService = workflowMessageService;
     this._vendorService = vendorService;
     this._shippingService = shippingService;
     this._shipmentService = shipmentService;
     this._taxService = taxService;
     this._customerService = customerService;
     this._discountService = discountService;
     this._encryptionService = encryptionService;
     this._customerActivityService = customerActivityService;
     this._currencyService = currencyService;
     this._affiliateService = affiliateService;
     this._eventPublisher = eventPublisher;
     this._pdfService = pdfService;
     this._paymentSettings = paymentSettings;
     this._shippingSettings = shippingSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._orderSettings = orderSettings;
     this._taxSettings = taxSettings;
     this._localizationSettings = localizationSettings;
     this._currencySettings = currencySettings;
 }
コード例 #27
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="productRepository">Product repository</param>
 /// <param name="productVariantRepository">Product variant repository</param>
 /// <param name="relatedProductRepository">Related product repository</param>
 /// <param name="crossSellProductRepository">Cross-sell product repository</param>
 /// <param name="tierPriceRepository">Tier price repository</param>
 /// <param name="localizedPropertyRepository">Localized property repository</param>
 /// <param name="productPictureRepository">Product picture repository</param>
 /// <param name="productSpecificationAttributeRepository">Product specification attribute repository</param>
 /// <param name="productAttributeService">Product attribute service</param>
 /// <param name="productAttributeParser">Product attribute parser service</param>
 /// <param name="languageService">Language service</param>
 /// <param name="workflowMessageService">Workflow message service</param>
 /// <param name="dataProvider">Data provider</param>
 /// <param name="dbContext">Database Context</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="commonSettings">Common settings</param>
 /// <param name="eventPublisher">Event published</param>
 public ProductService(ICacheManager cacheManager,
     IRepository<Product> productRepository,
     IRepository<ProductVariant> productVariantRepository,
     IRepository<RelatedProduct> relatedProductRepository,
     IRepository<CrossSellProduct> crossSellProductRepository,
     IRepository<TierPrice> tierPriceRepository,
     IRepository<ProductPicture> productPictureRepository,
     IRepository<LocalizedProperty> localizedPropertyRepository,
     IRepository<ProductSpecificationAttribute> productSpecificationAttributeRepository,
     IProductAttributeService productAttributeService,
     IProductAttributeParser productAttributeParser,
     ILanguageService languageService,
     IWorkflowMessageService workflowMessageService,
     IDataProvider dataProvider, IDbContext dbContext,
     LocalizationSettings localizationSettings, CommonSettings commonSettings,
     IEventPublisher eventPublisher)
 {
     this._cacheManager = cacheManager;
     this._productRepository = productRepository;
     this._productVariantRepository = productVariantRepository;
     this._relatedProductRepository = relatedProductRepository;
     this._crossSellProductRepository = crossSellProductRepository;
     this._tierPriceRepository = tierPriceRepository;
     this._productPictureRepository = productPictureRepository;
     this._localizedPropertyRepository = localizedPropertyRepository;
     this._productSpecificationAttributeRepository = productSpecificationAttributeRepository;
     this._productAttributeService = productAttributeService;
     this._productAttributeParser = productAttributeParser;
     this._languageService = languageService;
     this._workflowMessageService = workflowMessageService;
     this._dataProvider = dataProvider;
     this._dbContext = dbContext;
     this._localizationSettings = localizationSettings;
     this._commonSettings = commonSettings;
     this._eventPublisher = eventPublisher;
 }
コード例 #28
0
 public CustomerController(IAuthenticationService authenticationService,
     IDateTimeHelper dateTimeHelper,
     DateTimeSettings dateTimeSettings,
     TaxSettings taxSettings,
     ILocalizationService localizationService,
     IWorkContext workContext,
     IStoreContext storeContext,
     IStoreMappingService storeMappingService,
     ICustomerService customerService,
     ICustomerAttributeParser customerAttributeParser,
     ICustomerAttributeService customerAttributeService,
     IGenericAttributeService genericAttributeService,
     ICustomerRegistrationService customerRegistrationService,
     ITaxService taxService,
     RewardPointsSettings rewardPointsSettings,
     CustomerSettings customerSettings,
     AddressSettings addressSettings,
     ForumSettings forumSettings,
     OrderSettings orderSettings,
     IAddressService addressService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     IOrderService orderService,
     IPictureService pictureService,
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     IShoppingCartService shoppingCartService,
     IOpenAuthenticationService openAuthenticationService,
     IDownloadService downloadService,
     IWebHelper webHelper,
     ICustomerActivityService customerActivityService,
     IAddressAttributeParser addressAttributeParser,
     IAddressAttributeService addressAttributeService,
     IAddressAttributeFormatter addressAttributeFormatter,
     IReturnRequestService returnRequestService,
     IEventPublisher eventPublisher,
     MediaSettings mediaSettings,
     IWorkflowMessageService workflowMessageService,
     LocalizationSettings localizationSettings,
     CaptchaSettings captchaSettings,
     SecuritySettings securitySettings,
     ExternalAuthenticationSettings externalAuthenticationSettings,
     StoreInformationSettings storeInformationSettings)
 {
     this._authenticationService = authenticationService;
     this._dateTimeHelper = dateTimeHelper;
     this._dateTimeSettings = dateTimeSettings;
     this._taxSettings = taxSettings;
     this._localizationService = localizationService;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._storeMappingService = storeMappingService;
     this._customerService = customerService;
     this._customerAttributeParser = customerAttributeParser;
     this._customerAttributeService = customerAttributeService;
     this._genericAttributeService = genericAttributeService;
     this._customerRegistrationService = customerRegistrationService;
     this._taxService = taxService;
     this._rewardPointsSettings = rewardPointsSettings;
     this._customerSettings = customerSettings;
     this._addressSettings = addressSettings;
     this._forumSettings = forumSettings;
     this._orderSettings = orderSettings;
     this._addressService = addressService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._orderService = orderService;
     this._pictureService = pictureService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._shoppingCartService = shoppingCartService;
     this._openAuthenticationService = openAuthenticationService;
     this._downloadService = downloadService;
     this._webHelper = webHelper;
     this._customerActivityService = customerActivityService;
     this._addressAttributeParser = addressAttributeParser;
     this._addressAttributeService = addressAttributeService;
     this._addressAttributeFormatter = addressAttributeFormatter;
     this._returnRequestService = returnRequestService;
     this._eventPublisher = eventPublisher;
     this._mediaSettings = mediaSettings;
     this._workflowMessageService = workflowMessageService;
     this._localizationSettings = localizationSettings;
     this._captchaSettings = captchaSettings;
     this._securitySettings = securitySettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._storeInformationSettings = storeInformationSettings;
 }
コード例 #29
0
 public ProductController(ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IProductService productService,
     IVendorService vendorService,
     IProductTemplateService productTemplateService,
     IProductAttributeService productAttributeService,
     IWorkContext workContext,
     IStoreContext storeContext,
     ITaxService taxService,
     ICurrencyService currencyService,
     IPictureService pictureService,
     ILocalizationService localizationService,
     IMeasureService measureService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     IWebHelper webHelper,
     ISpecificationAttributeService specificationAttributeService,
     IDateTimeHelper dateTimeHelper,
     IRecentlyViewedProductsService recentlyViewedProductsService,
     ICompareProductsService compareProductsService,
     IWorkflowMessageService workflowMessageService,
     IProductTagService productTagService,
     IOrderReportService orderReportService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     IPermissionService permissionService,
     IDownloadService downloadService,
     ICustomerActivityService customerActivityService,
     IProductAttributeParser productAttributeParser,
     IShippingService shippingService,
     IEventPublisher eventPublisher,
     MediaSettings mediaSettings,
     CatalogSettings catalogSettings,
     VendorSettings vendorSettings,
     ShoppingCartSettings shoppingCartSettings,
     LocalizationSettings localizationSettings,
     CustomerSettings customerSettings,
     CaptchaSettings captchaSettings,
     SeoSettings seoSettings,
     ICacheManager cacheManager)
 {
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._productService = productService;
     this._vendorService = vendorService;
     this._productTemplateService = productTemplateService;
     this._productAttributeService = productAttributeService;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._taxService = taxService;
     this._currencyService = currencyService;
     this._pictureService = pictureService;
     this._localizationService = localizationService;
     this._measureService = measureService;
     this._priceCalculationService = priceCalculationService;
     this._priceFormatter = priceFormatter;
     this._webHelper = webHelper;
     this._specificationAttributeService = specificationAttributeService;
     this._dateTimeHelper = dateTimeHelper;
     this._recentlyViewedProductsService = recentlyViewedProductsService;
     this._compareProductsService = compareProductsService;
     this._workflowMessageService = workflowMessageService;
     this._productTagService = productTagService;
     this._orderReportService = orderReportService;
     this._aclService = aclService;
     this._storeMappingService = storeMappingService;
     this._permissionService = permissionService;
     this._downloadService = downloadService;
     this._customerActivityService = customerActivityService;
     this._productAttributeParser = productAttributeParser;
     this._shippingService = shippingService;
     this._eventPublisher = eventPublisher;
     this._mediaSettings = mediaSettings;
     this._catalogSettings = catalogSettings;
     this._vendorSettings = vendorSettings;
     this._shoppingCartSettings = shoppingCartSettings;
     this._localizationSettings = localizationSettings;
     this._customerSettings = customerSettings;
     this._captchaSettings = captchaSettings;
     this._seoSettings = seoSettings;
     this._cacheManager = cacheManager;
 }
コード例 #30
0
        public SettingController(ISettingService settingService,
            ICountryService countryService, IStateProvinceService stateProvinceService,
            IAddressService addressService, ITaxCategoryService taxCategoryService,
            ICurrencyService currencyService, IPictureService pictureService, 
            ILocalizationService localizationService, IDateTimeHelper dateTimeHelper,
            IOrderService orderService, IEncryptionService encryptionService,
            IThemeProvider themeProvider, ICustomerService customerService, 
            ICustomerActivityService customerActivityService, IPermissionService permissionService,
            IWebHelper webHelper, IFulltextService fulltextService,
            BlogSettings blogSettings,
            ForumSettings forumSettings, NewsSettings newsSettings,
            ShippingSettings shippingSettings, TaxSettings taxSettings,
            CatalogSettings catalogSettings, RewardPointsSettings rewardPointsSettings,
            CurrencySettings currencySettings, OrderSettings orderSettings,
            ShoppingCartSettings shoppingCartSettings, MediaSettings mediaSettings,
            CustomerSettings customerSettings,
            DateTimeSettings dateTimeSettings, StoreInformationSettings storeInformationSettings,
            SeoSettings seoSettings,SecuritySettings securitySettings, PdfSettings pdfSettings,
            LocalizationSettings localizationSettings, AdminAreaSettings adminAreaSettings,
            CaptchaSettings captchaSettings, ExternalAuthenticationSettings externalAuthenticationSettings,
            CommonSettings commonSettings)
        {
            this._settingService = settingService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._addressService = addressService;
            this._taxCategoryService = taxCategoryService;
            this._currencyService = currencyService;
            this._pictureService = pictureService;
            this._localizationService = localizationService;
            this._dateTimeHelper = dateTimeHelper;
            this._orderService = orderService;
            this._encryptionService = encryptionService;
            this._themeProvider = themeProvider;
            this._customerService = customerService;
            this._customerActivityService = customerActivityService;
            this._permissionService = permissionService;
            this._webHelper = webHelper;
            this._fulltextService = fulltextService;

            this._blogSettings = blogSettings;
            this._forumSettings = forumSettings;
            this._newsSettings = newsSettings;
            this._shippingSettings = shippingSettings;
            this._taxSettings = taxSettings;
            this._catalogSettings = catalogSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._currencySettings = currencySettings;
            this._orderSettings = orderSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._mediaSettings = mediaSettings;
            this._customerSettings = customerSettings;
            this._dateTimeSettings = dateTimeSettings;
            this._storeInformationSettings = storeInformationSettings;
            this._seoSettings = seoSettings;
            this._securitySettings = securitySettings;
            this._pdfSettings = pdfSettings;
            this._localizationSettings = localizationSettings;
            this._adminAreaSettings = adminAreaSettings;
            this._captchaSettings = captchaSettings;
            this._externalAuthenticationSettings = externalAuthenticationSettings;
            this._commonSettings = commonSettings;
        }