コード例 #1
0
 public mobSocialApiController(IPermissionService permissionService,
     IWorkContext workContext, AdminAreaSettings adminAreaSettings, ILocalizationService localizationService,
     IPictureService pictureService, IMobSocialService socialNetworkService, ICustomerService customerService,
     ICustomerAlbumPictureService customerAlbumPictureService, mobSocialSettings mobSocialSettings, MediaSettings mediaSettings, CustomerSettings customerSettings, 
     ForumSettings forumSettings, RewardPointsSettings rewardPointsSettings, OrderSettings orderSettings,
      IStoreContext storeContext, IWebHelper webHelper, IUrlRecordService urlRecordService, IRepository<UrlRecord> urlRecordRepository,
     ICustomerVideoAlbumService customerVideoAlbumService, CustomerProfileViewService customerProfileViewService)
 {
     _permissionService = permissionService;
     _workContext = workContext;
     _adminAreaSettings = adminAreaSettings;
     _localizationService = localizationService;
     _pictureService = pictureService;
     _socialNetworkService = socialNetworkService;
     _customerService = customerService;
     _customerAlbumPictureService = customerAlbumPictureService;
     _mobSocialSettings = mobSocialSettings;
     _mediaSettings = mediaSettings;
     _customerSettings = customerSettings;
     _forumSettings = forumSettings;
     _rewardPointsSettings = rewardPointsSettings;
     _orderSettings = orderSettings;
     _storeContext = storeContext;
     _webHelper = webHelper;
     _urlRecordService = urlRecordService;
     _urlRecordRepository = urlRecordRepository;
     _customerVideoAlbumService = customerVideoAlbumService;
     _customerProfileViewService = customerProfileViewService;
 }
コード例 #2
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;
 }
コード例 #3
0
ファイル: TaxServiceTests.cs プロジェクト: nvolpe/raver
        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);
        }
コード例 #4
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;
        }
コード例 #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
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="httpContext">HTTP context</param>
 /// <param name="customerService">Customer service</param>
 /// <param name="customerSettings">Customer settings</param>
 public FormsAuthenticationService(HttpContextBase httpContext,
     ICustomerService customerService, CustomerSettings customerSettings)
 {
     this._httpContext = httpContext;
     this._customerService = customerService;
     this._customerSettings = customerSettings;
     this._expirationTimeSpan = FormsAuthentication.Timeout;
 }
        public void Should_not_have_error_when_lastName_is_specified()
        {
            var customerSettings = new CustomerSettings();
            var validator = new CustomerInfoValidator(_localizationService, customerSettings);

            var model = new CustomerInfoModel();
            model.LastName = "Smith";
            validator.ShouldNotHaveValidationErrorFor(x => x.LastName, model);
        }
コード例 #8
0
 public DownloadController(IDownloadService downloadService, IProductService productService,
     IOrderService orderService, IWorkContext workContext, CustomerSettings customerSettings)
 {
     this._downloadService = downloadService;
     this._productService = productService;
     this._orderService = orderService;
     this._workContext = workContext;
     this._customerSettings = customerSettings;
 }
        public void Should_not_have_error_when_email_is_correct_format()
        {
            var customerSettings = new CustomerSettings();
            var validator = new CustomerInfoValidator(_localizationService, customerSettings);

            var model = new CustomerInfoModel();
            model.Email = "*****@*****.**";
            validator.ShouldNotHaveValidationErrorFor(x => x.Email, model);
        }
コード例 #10
0
        public void Should_not_have_error_when_email_is_null_but_usernames_are_enabled()
        {
            _customerSettings = new CustomerSettings();
            _customerSettings.UsernamesEnabled = true;
            _validator = new LoginValidator(_localizationService, _customerSettings);

            var model = new LoginModel();
            model.Email = null;
            _validator.ShouldNotHaveValidationErrorFor(x => x.Email, model);
        }
コード例 #11
0
        public NewsletterController(ILocalizationService localizationService,
            IWorkContext workContext, INewsLetterSubscriptionService newsLetterSubscriptionService,
            IWorkflowMessageService workflowMessageService, CustomerSettings customerSettings)
        {
            this._localizationService = localizationService;
            this._workContext = workContext;
            this._newsLetterSubscriptionService = newsLetterSubscriptionService;
            this._workflowMessageService = workflowMessageService;

            this._customerSettings = customerSettings;
        }
        public void Should_have_error_when_lastName_is_null_or_empty()
        {
            var customerSettings = new CustomerSettings();
            var validator = new CustomerInfoValidator(_localizationService, customerSettings);

            var model = new CustomerInfoModel();
            model.LastName = null;
            validator.ShouldHaveValidationErrorFor(x => x.LastName, model);
            model.LastName = "";
            validator.ShouldHaveValidationErrorFor(x => x.LastName, model);
        }
コード例 #13
0
 public PrivateMessagesController(IForumService forumService,
     ICustomerService customerService,
     IWorkContext workContext,
     ForumSettings forumSettings, CustomerSettings customerSettings)
 {
     this._forumService = forumService;
     this._customerService = customerService;
     this._workContext = workContext;
     this._forumSettings = forumSettings;
     this._customerSettings = customerSettings;
 }
コード例 #14
0
 public OnlineCustomerController(ICustomerService customerService,
     IGeoLookupService geoLookupService, IDateTimeHelper dateTimeHelper,
     CustomerSettings customerSettings,
     IPermissionService permissionService, ILocalizationService localizationService)
 {
     this._customerService = customerService;
     this._geoLookupService = geoLookupService;
     this._dateTimeHelper = dateTimeHelper;
     this._customerSettings = customerSettings;
     this._permissionService = permissionService;
     this._localizationService = localizationService;
 }
コード例 #15
0
 public OnlineCustomerController(ICustomerService customerService,
     IGeoCountryLookup geoCountryLookup, IDateTimeHelper dateTimeHelper,
     CustomerSettings customerSettings, AdminAreaSettings adminAreaSettings,
     IPermissionService permissionService)
 {
     this._customerService = customerService;
     this._geoCountryLookup = geoCountryLookup;
     this._dateTimeHelper = dateTimeHelper;
     this._customerSettings = customerSettings;
     this._adminAreaSettings = adminAreaSettings;
     this._permissionService = permissionService;
 }
コード例 #16
0
        public CustomerController(IAuthenticationService authenticationService,
            IDateTimeHelper dateTimeHelper,
            DateTimeSettings dateTimeSettings, TaxSettings taxSettings,
            ILocalizationService localizationService,
            IWorkContext workContext, ICustomerService customerService,
            ITaxService taxService, RewardPointsSettings rewardPointsSettings,
            CustomerSettings customerSettings, ForumSettings forumSettings,
            OrderSettings orderSettings, IAddressService addressService,
            ICountryService countryService, IStateProvinceService stateProvinceService,
            IOrderTotalCalculationService orderTotalCalculationService,
            IOrderProcessingService orderProcessingService, IOrderService orderService,
            ICurrencyService currencyService, IPriceFormatter priceFormatter,
            IPictureService pictureService, INewsLetterSubscriptionService newsLetterSubscriptionService,
            IForumService forumService, IShoppingCartService shoppingCartService,
            IOpenAuthenticationService openAuthenticationService,
            IBackInStockSubscriptionService backInStockSubscriptionService, MediaSettings mediaSettings,
            IWorkflowMessageService workflowMessageService, LocalizationSettings localizationSettings,
            CaptchaSettings captchaSettings, ExternalAuthenticationSettings externalAuthenticationSettings)
        {
            this._authenticationService = authenticationService;
            this._dateTimeHelper = dateTimeHelper;
            this._dateTimeSettings = dateTimeSettings;
            this._taxSettings = taxSettings;
            this._localizationService = localizationService;
            this._workContext = workContext;
            this._customerService = customerService;
            this._taxService = taxService;
            this._rewardPointsSettings = rewardPointsSettings;
            this._customerSettings = customerSettings;
            this._forumSettings = forumSettings;
            this._orderSettings = orderSettings;
            this._addressService = addressService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._orderProcessingService = orderProcessingService;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._orderService = orderService;
            this._currencyService = currencyService;
            this._priceFormatter = priceFormatter;
            this._pictureService = pictureService;
            this._newsLetterSubscriptionService = newsLetterSubscriptionService;
            this._forumService = forumService;
            this._shoppingCartService = shoppingCartService;
            this._openAuthenticationService = openAuthenticationService;
            this._backInStockSubscriptionService = backInStockSubscriptionService;

            this._mediaSettings = mediaSettings;
            this._workflowMessageService = workflowMessageService;
            this._localizationSettings = localizationSettings;
            this._captchaSettings = captchaSettings;
            this._externalAuthenticationSettings = externalAuthenticationSettings;
        }
コード例 #17
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="customerService">Customer service</param>
 /// <param name="encryptionService">Encryption service</param>
 /// <param name="newsLetterSubscriptionService">Newsletter subscription service</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="customerSettings">Customer settings</param>
 public CustomerRegistrationService(ICustomerService customerService, 
     IEncryptionService encryptionService,
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     ILocalizationService localizationService,
     RewardPointsSettings rewardPointsSettings, CustomerSettings customerSettings)
 {
     this._customerService = customerService;
     this._encryptionService = encryptionService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._localizationService = localizationService;
     this._rewardPointsSettings = rewardPointsSettings;
     this._customerSettings = customerSettings;
 }
コード例 #18
0
ファイル: NopService.cs プロジェクト: cmcginn/StoreFront
 public NopService()
 {
     _addressService = EngineContext.Current.Resolve<IAddressService>();
     _countryService = EngineContext.Current.Resolve<ICountryService>();
     _stateProvinceService = EngineContext.Current.Resolve<IStateProvinceService>();
     _customerService = EngineContext.Current.Resolve<ICustomerService>();
     _customerSettings = EngineContext.Current.Resolve<CustomerSettings>();
     _permissionSettings = EngineContext.Current.Resolve<IPermissionService>();
     _orderProcessingService = EngineContext.Current.Resolve<IOrderProcessingService>();
     _orderService = EngineContext.Current.Resolve<IOrderService>();
     _authenticationService = EngineContext.Current.Resolve<IAuthenticationService>();
     _workContext = EngineContext.Current.Resolve<IWorkContext>();
     _pluginFinder = EngineContext.Current.Resolve<IPluginFinder>();
 }
コード例 #19
0
 public PrivateMessagesController(IForumService forumService,
     ICustomerService customerService, ICustomerActivityService customerActivityService,
     ILocalizationService localizationService, IWorkContext workContext,
     IDateTimeHelper dateTimeHelper,
     ForumSettings forumSettings, CustomerSettings customerSettings)
 {
     this._forumService = forumService;
     this._customerService = customerService;
     this._customerActivityService = customerActivityService;
     this._localizationService = localizationService;
     this._workContext = workContext;
     this._dateTimeHelper = dateTimeHelper;
     this._forumSettings = forumSettings;
     this._customerSettings = customerSettings;
 }
コード例 #20
0
 public BackInStockSubscriptionController(IProductService productService,
     IWorkContext workContext,
     IStoreContext storeContext,
     ILocalizationService localizationService,
     IBackInStockSubscriptionService backInStockSubscriptionService,
     CatalogSettings catalogSettings,
     CustomerSettings customerSettings)
 {
     this._productService = productService;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._localizationService = localizationService;
     this._backInStockSubscriptionService = backInStockSubscriptionService;
     this._catalogSettings = catalogSettings;
     this._customerSettings = customerSettings;
 }
コード例 #21
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="customerRepository">Customer repository</param>
 /// <param name="customerRoleRepository">Customer role repository</param>
 /// <param name="gaRepository">Generic attribute repository</param>
 /// <param name="genericAttributeService">Generic attribute service</param>
 /// <param name="eventPublisher">Event published</param>
 public CustomerService(ICacheManager cacheManager,
     IRepository<Customer> customerRepository,
     IRepository<CustomerRole> customerRoleRepository,
     IRepository<GenericAttribute> gaRepository,
     IGenericAttributeService genericAttributeService,
     IEventPublisher eventPublisher, 
     CustomerSettings customerSettings)
 {
     this._cacheManager = cacheManager;
     this._customerRepository = customerRepository;
     this._customerRoleRepository = customerRoleRepository;
     this._gaRepository = gaRepository;
     this._genericAttributeService = genericAttributeService;
     this._eventPublisher = eventPublisher;
     this._customerSettings = customerSettings;
 }
コード例 #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, IMobileDeviceHelper mobileDeviceHelper,
            HttpContextBase httpContext, CustomerSettings customerSettings, 
            TaxSettings taxSettings, CatalogSettings catalogSettings,
            StoreInformationSettings storeInformationSettings, EmailAccountSettings emailAccountSettings,
            CommonSettings commonSettings, BlogSettings blogSettings, ForumSettings forumSettings,
            LocalizationSettings localizationSettings, CaptchaSettings captchaSettings)
        {
            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._mobileDeviceHelper = mobileDeviceHelper;
            this._httpContext = httpContext;

            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;
            this._captchaSettings = captchaSettings;
        }
コード例 #23
0
ファイル: CustomerController.cs プロジェクト: pquic/qCommerce
 public CustomerController(ICustomerService customerService,
     ICustomerRegistrationService customerRegistrationService,
     ICustomerReportService customerReportService, IDateTimeHelper dateTimeHelper,
     ILocalizationService localizationService, DateTimeSettings dateTimeSettings,
     TaxSettings taxSettings, RewardPointsSettings rewardPointsSettings,
     ICountryService countryService, IStateProvinceService stateProvinceService, 
     IAddressService addressService,
     CustomerSettings customerSettings, ITaxService taxService, 
     IWorkContext workContext, IPriceFormatter priceFormatter,
     IOrderService orderService, IExportManager exportManager,
     ICustomerActivityService customerActivityService,
     IPriceCalculationService priceCalculationService,
     IPermissionService permissionService, AdminAreaSettings adminAreaSettings,
     IQueuedEmailService queuedEmailService, EmailAccountSettings emailAccountSettings,
     IEmailAccountService emailAccountService, ForumSettings forumSettings,
     IForumService forumService, IOpenAuthenticationService openAuthenticationService)
 {
     this._customerService = customerService;
     this._customerRegistrationService = customerRegistrationService;
     this._customerReportService = customerReportService;
     this._dateTimeHelper = dateTimeHelper;
     this._localizationService = localizationService;
     this._dateTimeSettings = dateTimeSettings;
     this._taxSettings = taxSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._addressService = addressService;
     this._customerSettings = customerSettings;
     this._taxService = taxService;
     this._workContext = workContext;
     this._priceFormatter = priceFormatter;
     this._orderService = orderService;
     this._exportManager = exportManager;
     this._customerActivityService = customerActivityService;
     this._priceCalculationService = priceCalculationService;
     this._permissionService = permissionService;
     this._adminAreaSettings = adminAreaSettings;
     this._queuedEmailService = queuedEmailService;
     this._emailAccountSettings = emailAccountSettings;
     this._emailAccountService = emailAccountService;
     this._forumSettings = forumSettings;
     this._forumService = forumService;
     this._openAuthenticationService = openAuthenticationService;
 }
コード例 #24
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="customerService">Customer service</param>
 /// <param name="encryptionService">Encryption service</param>
 /// <param name="newsLetterSubscriptionService">Newsletter subscription service</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="storeService">Store service</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="customerSettings">Customer settings</param>
 public CustomerRegistrationService(ICustomerService customerService, 
     IEncryptionService encryptionService, 
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     ILocalizationService localizationService,
     IStoreService storeService,
     RewardPointsSettings rewardPointsSettings,
     CustomerSettings customerSettings,
     IDbContext dbContext)
 {
     this._customerService = customerService;
     this._encryptionService = encryptionService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._localizationService = localizationService;
     this._storeService = storeService;
     this._rewardPointsSettings = rewardPointsSettings;
     this._customerSettings = customerSettings;
     this._dbContext = dbContext;
 }
コード例 #25
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;
 }
コード例 #26
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="addressService">Address service</param>
 /// <param name="workContext">Work context</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="pluginFinder">Plugin finder</param>
 /// <param name="geoLookupService">GEO lookup service</param>
 /// <param name="countryService">Country service</param>
 /// <param name="customerSettings">Customer settings</param>
 /// <param name="addressSettings">Address settings</param>
 public TaxService(IAddressService addressService,
     IWorkContext workContext,
     TaxSettings taxSettings,
     IPluginFinder pluginFinder,
     IGeoLookupService geoLookupService,
     ICountryService countryService,
     CustomerSettings customerSettings,
     AddressSettings addressSettings)
 {
     this._addressService = addressService;
     this._workContext = workContext;
     this._taxSettings = taxSettings;
     this._pluginFinder = pluginFinder;
     this._geoLookupService = geoLookupService;
     this._countryService = countryService;
     this._customerSettings = customerSettings;
     this._addressSettings = addressSettings;
 }
コード例 #27
0
ファイル: ProfileController.cs プロジェクト: pquic/qCommerce
 public ProfileController(IForumService forumService,
     ILocalizationService localizationService,
     IPictureService pictureService,
     ICountryService countryService,
     ICustomerService customerService,
     IDateTimeHelper dateTimeHelper,
     ForumSettings forumSettings,
     CustomerSettings customerSettings,
     MediaSettings mediaSettings)
 {
     this._forumService = forumService;
     this._localizationService = localizationService;
     this._pictureService = pictureService;
     this._countryService = countryService;
     this._customerService = customerService;
     this._dateTimeHelper = dateTimeHelper;
     this._forumSettings = forumSettings;
     this._customerSettings = customerSettings;
     this._mediaSettings = mediaSettings;
 }
コード例 #28
0
        public void Should_have_error_when_company_is_null_or_empty_based_on_required_setting()
        {
            var customerSettings = new CustomerSettings()
            {
                CompanyEnabled = true
            };
            var validator = new CustomerInfoValidator(_localizationService, customerSettings);

            var model = new CustomerInfoModel();
            //required
            customerSettings.CompanyRequired = true;
            model.Company = null;
            validator.ShouldHaveValidationErrorFor(x => x.Company, model);
            model.Company = "";
            validator.ShouldHaveValidationErrorFor(x => x.Company, model);
            //not required
            customerSettings.CompanyRequired = false;
            model.Company = null;
            validator.ShouldNotHaveValidationErrorFor(x => x.Company, model);
            model.Company = "";
            validator.ShouldNotHaveValidationErrorFor(x => x.Company, model);
        }
コード例 #29
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;
        }
コード例 #30
0
 public BusinessPageApiController(IForumService forumService, ILocalizationService localizationService,
     IPictureService pictureService, ICountryService countryService,
     ICustomerService customerService, IDateTimeHelper dateTimeHelper,
     ForumSettings forumSettings, CustomerSettings customerSettings,
     MediaSettings mediaSettings, IBusinessPageService businessPageService,
     mobSocialSettings mobSocialSettings, IEventPageAttendanceService eventPageAttendanceService,
     IMobSocialService mobSocialService, IWorkContext workContext, IStateProvinceService stateProvinceService)
 {
     _localizationService = localizationService;
     _pictureService = pictureService;
     _countryService = countryService;
     _customerService = customerService;
     _dateTimeHelper = dateTimeHelper;
     _forumSettings = forumSettings;
     _customerSettings = customerSettings;
     _mediaSettings = mediaSettings;
     _businessPageService = businessPageService;
     _eventPageAttendanceService = eventPageAttendanceService;
     _mobSocialSettings = mobSocialSettings;
     _mobSocialService = mobSocialService;
     _workContext = workContext;
     _stateProvinceService = stateProvinceService;
 }