Ejemplo n.º 1
0
        public BrigitaWorkContext(ILocaleCodeProvider localeCtx, ILanguageService languages) {
            _localeCtx = localeCtx;
            _languages = languages;

            _lzLanguage = new Lazy<Language>(() => _languages.GetLanguageByCode(_localeCtx.LocaleCode)
                                                    ?? _languages.GetDefaultLanguage());
        }
 public CheckoutAttributeController(ICheckoutAttributeService checkoutAttributeService,
     ILanguageService languageService, 
     ILocalizedEntityService localizedEntityService,
     ILocalizationService localizationService,
     ITaxCategoryService taxCategoryService,
     IWorkContext workContext, 
     ICurrencyService currencyService, 
     ICustomerActivityService customerActivityService, 
     CurrencySettings currencySettings,
     IMeasureService measureService, 
     MeasureSettings measureSettings,
     IPermissionService permissionService,
     IStoreService storeService,
     IStoreMappingService storeMappingService)
 {
     this._checkoutAttributeService = checkoutAttributeService;
     this._languageService = languageService;
     this._localizedEntityService = localizedEntityService;
     this._localizationService = localizationService;
     this._taxCategoryService = taxCategoryService;
     this._workContext = workContext;
     this._currencyService = currencyService;
     this._customerActivityService = customerActivityService;
     this._currencySettings = currencySettings;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
     this._permissionService = permissionService;
     this._storeService = storeService;
     this._storeMappingService = storeMappingService;
 }
Ejemplo n.º 3
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;
 }
Ejemplo n.º 4
0
 public VendorController(ICustomerService customerService, 
     ILocalizationService localizationService,
     IVendorService vendorService, 
     IPermissionService permissionService,
     IUrlRecordService urlRecordService,
     ILanguageService languageService,
     ILocalizedEntityService localizedEntityService,
     VendorSettings vendorSettings,
     IPictureService pictureService,
     IProductService productService,
     IWorkContext workContext,
     IGenericAttributeService genericAttributeService,
     IWorkflowMessageService workflowMessageService)
 {
     this._customerService = customerService;
     this._localizationService = localizationService;
     this._vendorService = vendorService;
     this._permissionService = permissionService;
     this._urlRecordService = urlRecordService;
     this._languageService = languageService;
     this._localizedEntityService = localizedEntityService;
     this._vendorSettings = vendorSettings;
     this._pictureService = pictureService;
     this._productService = productService;
     this._workContext = workContext;
     this._workflowMessageService = workflowMessageService;
     this._genericAttributeService = genericAttributeService;
 }
Ejemplo n.º 5
0
 public ShippingController(IShippingService shippingService, 
     ShippingSettings shippingSettings,
     ISettingService settingService,
     IAddressService addressService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     ILocalizationService localizationService, 
     IPermissionService permissionService,
      ILocalizedEntityService localizedEntityService,
     ILanguageService languageService,
     IPluginFinder pluginFinder,
     IWebHelper webHelper)
 {
     this._shippingService = shippingService;
     this._shippingSettings = shippingSettings;
     this._settingService = settingService;
     this._addressService = addressService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._localizationService = localizationService;
     this._permissionService = permissionService;
     this._localizedEntityService = localizedEntityService;
     this._languageService = languageService;
     this._pluginFinder = pluginFinder;
     this._webHelper = webHelper;
 }
        public WebWorkContext(Func<string, ICacheManager> cacheManager,
            HttpContextBase httpContext,
            ICustomerService customerService,
			IStoreContext storeContext,
            IAuthenticationService authenticationService,
            ILanguageService languageService,
            ICurrencyService currencyService,
			IGenericAttributeService attrService,
            TaxSettings taxSettings, CurrencySettings currencySettings,
            LocalizationSettings localizationSettings, Lazy<ITaxService> taxService,
            IStoreService storeService, ISettingService settingService,
			IUserAgent userAgent)
        {
            this._cacheManager = cacheManager("static");
            this._httpContext = httpContext;
            this._customerService = customerService;
            this._storeContext = storeContext;
            this._authenticationService = authenticationService;
            this._languageService = languageService;
            this._attrService = attrService;
            this._currencyService = currencyService;
            this._taxSettings = taxSettings;
            this._taxService = taxService;
            this._currencySettings = currencySettings;
            this._localizationSettings = localizationSettings;
            this._storeService = storeService;
            this._settingService = settingService;
            this._userAgent = userAgent;
        }
Ejemplo n.º 7
0
        public PluginController(IPluginFinder pluginFinder,
            IOfficialFeedManager officialFeedManager,
            ILocalizationService localizationService,
            IWebHelper webHelper,
            IPermissionService permissionService, 
            ILanguageService languageService,
            ISettingService settingService, 
            IStoreService storeService,
            PaymentSettings paymentSettings,
            ShippingSettings shippingSettings,
            TaxSettings taxSettings, 
            ExternalAuthenticationSettings externalAuthenticationSettings, 
            WidgetSettings widgetSettings)
		{
            this._pluginFinder = pluginFinder;
            this._officialFeedManager = officialFeedManager;
            this._localizationService = localizationService;
            this._webHelper = webHelper;
            this._permissionService = permissionService;
            this._languageService = languageService;
            this._settingService = settingService;
            this._storeService = storeService;
            this._paymentSettings = paymentSettings;
            this._shippingSettings = shippingSettings;
            this._taxSettings = taxSettings;
            this._externalAuthenticationSettings = externalAuthenticationSettings;
            this._widgetSettings = widgetSettings;
		}
        public NewsController(INewsService newsService,
			IWorkContext workContext, IStoreContext storeContext, 
			IPictureService pictureService, ILocalizationService localizationService,
            ICustomerContentService customerContentService, IDateTimeHelper dateTimeHelper,
            IWorkflowMessageService workflowMessageService, IWebHelper webHelper,
            ICacheManager cacheManager, ICustomerActivityService customerActivityService,
			IStoreMappingService storeMappingService,
			ILanguageService languageService,
            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._customerContentService = customerContentService;
            this._dateTimeHelper = dateTimeHelper;
            this._workflowMessageService = workflowMessageService;
            this._webHelper = webHelper;
            this._cacheManager = cacheManager;
            this._customerActivityService = customerActivityService;
            this._storeMappingService = storeMappingService;
            this._languageService = languageService;

            this._mediaSettings = mediaSettings;
            this._newsSettings = newsSettings;
            this._localizationSettings = localizationSettings;
            this._customerSettings = customerSettings;
            this._captchaSettings = captchaSettings;
        }
Ejemplo n.º 9
0
 public TopicController(ITopicService topicService,
     ILanguageService languageService,
     ILocalizedEntityService localizedEntityService, 
     ILocalizationService localizationService,
     IPermissionService permissionService, 
     IStoreService storeService,
     IStoreMappingService storeMappingService,
     IUrlRecordService urlRecordService,
     ITopicTemplateService topicTemplateService,
     ICustomerService customerService,
     ICustomerActivityService customerActivityService,
     IAclService aclService)
 {
     this._topicService = topicService;
     this._languageService = languageService;
     this._localizedEntityService = localizedEntityService;
     this._localizationService = localizationService;
     this._permissionService = permissionService;
     this._storeService = storeService;
     this._storeMappingService = storeMappingService;
     this._urlRecordService = urlRecordService;
     this._topicTemplateService = topicTemplateService;
     this._customerService = customerService;
     this._customerActivityService = customerActivityService;
     this._aclService = aclService;
 }
Ejemplo n.º 10
0
        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;
        }
 public ManufacturerController(ICategoryService categoryService, IManufacturerService manufacturerService,
     IManufacturerTemplateService manufacturerTemplateService, IProductService productService,
     ICustomerService customerService, IStoreService storeService,
     IStoreMappingService storeMappingService,
     IUrlRecordService urlRecordService, IPictureService pictureService,
     ILanguageService languageService, ILocalizationService localizationService,
     ILocalizedEntityService localizedEntityService, IExportManager exportManager,
     ICustomerActivityService customerActivityService, IAclService aclService, 
     IPermissionService permissionService,
     AdminAreaSettings adminAreaSettings, CatalogSettings catalogSettings)
 {
     this._categoryService = categoryService;
     this._manufacturerTemplateService = manufacturerTemplateService;
     this._manufacturerService = manufacturerService;
     this._productService = productService;
     this._customerService = customerService;
     this._storeService = storeService;
     this._storeMappingService = storeMappingService;
     this._urlRecordService = urlRecordService;
     this._pictureService = pictureService;
     this._languageService = languageService;
     this._localizationService = localizationService;
     this._localizedEntityService = localizedEntityService;
     this._exportManager = exportManager;
     this._customerActivityService = customerActivityService;
     this._aclService = aclService;
     this._permissionService = permissionService;
     this._adminAreaSettings = adminAreaSettings;
     this._catalogSettings = catalogSettings;
 }
Ejemplo n.º 12
0
 public DiyGroupController(IPermissionService permissionService,
     IDiyService branchService, 
     ILanguageService languageService, 
     ILocalizationService localizationService, 
     IStoreMappingService storeMappingService, 
     ILocalizedEntityService localizedEntityService, 
     IStoreService storeService,
     IPictureService pictureService, 
     IUrlRecordService urlRecordService, 
     ICustomerActivityService customerActivityService, 
     IWorkContext workContext,
     ICacheManager cacheManager, 
     DiySettings diySettings, 
     IWebHelper webHelper)
 {
     _permissionService = permissionService;
     _diyService = branchService;
     _languageService = languageService;
     _localizationService = localizationService;
     _storeMappingService = storeMappingService;
     _localizedEntityService = localizedEntityService;
     _storeService = storeService;
     _pictureService = pictureService;
     _urlRecordService = urlRecordService;
     _customerActivityService = customerActivityService;
     _workContext = workContext;
     _cacheManager = cacheManager;
     _diySettings = diySettings;
     _webHelper = webHelper;
 }
Ejemplo n.º 13
0
        public ExportManager(ICategoryService categoryService,
            IManufacturerService manufacturerService,
            IProductService productService,
			IProductAttributeService productAttributeService,
            IProductTemplateService productTemplateService,
            IPictureService pictureService,
            INewsLetterSubscriptionService newsLetterSubscriptionService,
            ILanguageService languageService,
			MediaSettings mediaSettings,
			ICommonServices services,
            IStoreMappingService storeMappingService)
        {
            _categoryService = categoryService;
            _manufacturerService = manufacturerService;
            _productService = productService;
			_productAttributeService = productAttributeService;
			_productTemplateService = productTemplateService;
            _pictureService = pictureService;
            _newsLetterSubscriptionService = newsLetterSubscriptionService;
            _languageService = languageService;
			_mediaSettings = mediaSettings;
			_services = services;
            _storeMappingService = storeMappingService;

			Logger = NullLogger.Instance;
        }
Ejemplo n.º 14
0
 public CountryController(ICountryService countryService,
     IStateProvinceService stateProvinceService,
     ICityService cityService,
     IZipcodeService zipcodeService,
     ILocalizationService localizationService,
     IAddressService addressService,
     IPermissionService permissionService,
     ILocalizedEntityService localizedEntityService,
     ILanguageService languageService,
     IStoreService storeService,
     IStoreMappingService storeMappingService,
     IExportManager exportManager,
     IImportManager importManager)
 {
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._cityService = cityService;
     this._zipcodeService = zipcodeService;
     this._localizationService = localizationService;
     this._addressService = addressService;
     this._permissionService = permissionService;
     this._localizedEntityService = localizedEntityService;
     this._languageService = languageService;
     this._storeService = storeService;
     this._storeMappingService = storeMappingService;
     this._exportManager = exportManager;
     this._importManager = importManager;
 }
Ejemplo n.º 15
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 CommonController(IPaymentService paymentService, 
     IShippingService shippingService,
     IShoppingCartService shoppingCartService,
     ICurrencyService currencyService,
     IMeasureService measureService,
     ICustomerService customerService,
     IUrlRecordService urlRecordService,
     IWebHelper webHelper,
     CurrencySettings currencySettings,
     MeasureSettings measureSettings,
     IDateTimeHelper dateTimeHelper,
     ILanguageService languageService,
     IWorkContext workContext,
     IStoreContext storeContext,
     IPermissionService permissionService,
     ILocalizationService localizationService)
 {
     this._paymentService = paymentService;
     this._shippingService = shippingService;
     this._shoppingCartService = shoppingCartService;
     this._currencyService = currencyService;
     this._measureService = measureService;
     this._customerService = customerService;
     this._urlRecordService = urlRecordService;
     this._webHelper = webHelper;
     this._currencySettings = currencySettings;
     this._measureSettings = measureSettings;
     this._dateTimeHelper = dateTimeHelper;
     this._languageService = languageService;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._permissionService = permissionService;
     this._localizationService = localizationService;
 }
 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;
 }
 public AudioController(IAudioFileService audioFileService, ILanguageService languageService, IKnowledgeLevelService knowledgeLevelService, IExhibitService exhibitService)
 {
     this._audioFileService = audioFileService;
     this._languageService = languageService;
     this._knowledgeLevelService = knowledgeLevelService;
     this._exhibitService = exhibitService;
 }
Ejemplo n.º 19
0
 public ProductController(IProductService productService, 
     IProductTemplateService productTemplateService,
     ICategoryService categoryService, IManufacturerService manufacturerService,
     IWorkContext workContext, ILanguageService languageService, 
     ILocalizationService localizationService, ILocalizedEntityService localizedEntityService,
     ISpecificationAttributeService specificationAttributeService, IPictureService pictureService,
     ITaxCategoryService taxCategoryService, IProductTagService productTagService,
     ICopyProductService copyProductService, IPdfService pdfService,
     IExportManager exportManager, IImportManager importManager,
     ICustomerActivityService customerActivityService,
     IPermissionService permissionService, AdminAreaSettings adminAreaSettings)
 {
     this._productService = productService;
     this._productTemplateService = productTemplateService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._workContext = workContext;
     this._languageService = languageService;
     this._localizationService = localizationService;
     this._localizedEntityService = localizedEntityService;
     this._specificationAttributeService = specificationAttributeService;
     this._pictureService = pictureService;
     this._taxCategoryService = taxCategoryService;
     this._productTagService = productTagService;
     this._copyProductService = copyProductService;
     this._pdfService = pdfService;
     this._exportManager = exportManager;
     this._importManager = importManager;
     this._customerActivityService = customerActivityService;
     this._permissionService = permissionService;
     this._adminAreaSettings = adminAreaSettings;
 }
Ejemplo n.º 20
0
        public MessageTokenProvider(ILanguageService languageService,
            ILocalizationService localizationService, IDateTimeHelper dateTimeHelper,
            IEmailAccountService emailAccountService,
            IPriceFormatter priceFormatter, ICurrencyService currencyService,IWebHelper webHelper,
            IWorkContext workContext, IDownloadService downloadService,
            IOrderService orderService,
            StoreInformationSettings storeSettings, MessageTemplatesSettings templatesSettings,
            EmailAccountSettings emailAccountSettings, CatalogSettings catalogSettings,
            TaxSettings taxSettings)
        {
            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._storeSettings = storeSettings;
            this._templatesSettings = templatesSettings;
            this._emailAccountSettings = emailAccountSettings;
            this._catalogSettings = catalogSettings;
            this._taxSettings = taxSettings;
        }
        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);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindowViewModel"/> class.
        /// </summary>
        public MainWindowViewModel(IUIVisualizerService uiVisualizerService, IPleaseWaitService pleaseWaitService, ILanguageService languageService)
            : base()
        {
            _uiVisualizerService = uiVisualizerService;
            _pleaseWaitService = pleaseWaitService;
            _languageService = languageService;

            AvailableLanguages = new ObservableCollection<Language>();
            AvailableLanguages.Add(new Language("English", "en-US"));
            AvailableLanguages.Add(new Language("Chinese (simplified)", "zh-HANS"));
            AvailableLanguages.Add(new Language("Dutch", "nl"));
            AvailableLanguages.Add(new Language("French", "fr"));
            AvailableLanguages.Add(new Language("German", "de"));
            AvailableLanguages.Add(new Language("Spanish", "es"));
            AvailableLanguages.Add(new Language("Turkish", "tr"));

            var currentLanguage = (from language in AvailableLanguages
                                   where Thread.CurrentThread.CurrentUICulture.Name.StartsWith(language.Code)
                                   select language).FirstOrDefault();

            SelectedLanguage = currentLanguage ?? AvailableLanguages[0];

            DataWindow = new Command(OnDataWindowExecute);
            PleaseWaitWindow = new Command(OnPleaseWaitWindowExecute);
            MultipleChoiceWindow = new Command(OnMultipleChoiceWindowExecute);
            MultiLineInput = new Command(OnMultiLineInputExecute);
        }
Ejemplo n.º 23
0
        public AboutViewModel(AboutInfo aboutInfo, IProcessService processService, IUIVisualizerService uiVisualizerService,
            IMessageService messageService, ILanguageService languageService)
        {
            Argument.IsNotNull(() => aboutInfo);
            Argument.IsNotNull(() => processService);
            Argument.IsNotNull(() => uiVisualizerService);
            Argument.IsNotNull(() => messageService);
            Argument.IsNotNull(() => languageService);

            _processService = processService;
            _uiVisualizerService = uiVisualizerService;
            _messageService = messageService;
            _languageService = languageService;

            var assembly = aboutInfo.Assembly;
            var version = aboutInfo.DisplayVersion;
            var buildDateTime = aboutInfo.BuildDateTime.Value;

            Title = aboutInfo.Name;
            Version = string.Format("v {0}", aboutInfo.DisplayVersion);
            BuildDateTime = string.Format(languageService.GetString("Orchestra_BuiltOn"), buildDateTime);
            UriInfo = aboutInfo.UriInfo;
            Copyright = aboutInfo.Copyright;
            CompanyLogoUri = aboutInfo.CompanyLogoUri;
            ImageSourceUrl = aboutInfo.LogoImageSource;
            ShowLogButton = aboutInfo.ShowLogButton;
            AppIcon = aboutInfo.AppIcon;
            OpenUrl = new Command(OnOpenUrlExecute, OnOpenUrlCanExecute);
            OpenLog = new TaskCommand(OnOpenLogExecuteAsync);
            ShowSystemInfo = new Command(OnShowSystemInfoExecute);
            EnableDetailedLogging = new Command(OnEnableDetailedLoggingExecute);
        }
Ejemplo n.º 24
0
 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;
 }
        public CustomerRoleController(ICustomerService customerService,
            ILocalizationService localizationService, 
            ICustomerActivityService customerActivityService,
            IPermissionService permissionService,
            IProductService productService,
            ICategoryService categoryService,
            IManufacturerService manufacturerService,
            IStoreService storeService,
            IVendorService vendorService,
            IWorkContext workContext,
            ILanguageService languageService,
            ILocalizedEntityService localizedEntityService,
            ICacheManager cacheManager)
		{
            this._customerService = customerService;
            this._localizationService = localizationService;
            this._customerActivityService = customerActivityService;
            this._permissionService = permissionService;
            this._productService = productService;
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._storeService = storeService;
            this._vendorService = vendorService;
            this._workContext = workContext;
            this._languageService = languageService;
            this._localizedEntityService = localizedEntityService;
            this._cacheManager = cacheManager;
        }
        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,
            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._templatesSettings = templatesSettings;
            this._emailAccountSettings = emailAccountSettings;
            this._catalogSettings = catalogSettings;
            this._taxSettings = taxSettings;
            this._eventPublisher = eventPublisher;
        }
Ejemplo n.º 27
0
        public SettingsViewModel(ISpeakService speakService, ILanguageService languageService)
        {
            this.speakService = speakService;
            this.languageService = languageService;

            SetupLanguages();
        }
Ejemplo n.º 28
0
 public CategoryController(ICategoryService categoryService, ICategoryTemplateService categoryTemplateService,
     IManufacturerService manufacturerService, IProductService productService, 
     ICustomerService customerService,
     IUrlRecordService urlRecordService, IPictureService pictureService, ILanguageService languageService,
     ILocalizationService localizationService, ILocalizedEntityService localizedEntityService,
     IDiscountService discountService, IPermissionService permissionService,
     IAclService aclService,
     IExportManager exportManager, IWorkContext workContext,
     ICustomerActivityService customerActivityService, AdminAreaSettings adminAreaSettings,
     CatalogSettings catalogSettings)
 {
     this._categoryService = categoryService;
     this._categoryTemplateService = categoryTemplateService;
     this._manufacturerService = manufacturerService;
     this._productService = productService;
     this._customerService = customerService;
     this._urlRecordService = urlRecordService;
     this._pictureService = pictureService;
     this._languageService = languageService;
     this._localizationService = localizationService;
     this._localizedEntityService = localizedEntityService;
     this._discountService = discountService;
     this._permissionService = permissionService;
     this._aclService = aclService;
     this._exportManager = exportManager;
     this._workContext = workContext;
     this._customerActivityService = customerActivityService;
     this._adminAreaSettings = adminAreaSettings;
     this._catalogSettings = catalogSettings;
 }
Ejemplo n.º 29
0
 public FroogleService(IGoogleService googleService,
     IPriceCalculationService priceCalculationService,
     ITaxService taxService, 
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IPictureService pictureService,
     ICurrencyService currencyService,
     ILanguageService languageService,
     ISettingService settingService,
     IWorkContext workContext,
     IMeasureService measureService,
     MeasureSettings measureSettings,
     FroogleSettings froogleSettings,
     CurrencySettings currencySettings,
     GoogleProductObjectContext objectContext)
 {
     this._googleService = googleService;
     this._priceCalculationService = priceCalculationService;
     this._taxService = taxService;
     this._productService = productService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService = pictureService;
     this._currencyService = currencyService;
     this._languageService = languageService;
     this._settingService = settingService;
     this._workContext = workContext;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
     this._froogleSettings = froogleSettings;
     this._currencySettings = currencySettings;
     this._objectContext = objectContext;
 }
Ejemplo n.º 30
0
 public CopyProductService(IProductService productService,
     IProductAttributeService productAttributeService,
     ILanguageService languageService,
     ILocalizedEntityService localizedEntityService, 
     IPictureService pictureService,
     ICategoryService categoryService, 
     IManufacturerService manufacturerService,
     ISpecificationAttributeService specificationAttributeService,
     IDownloadService downloadService,
     IProductAttributeParser productAttributeParser,
     IUrlRecordService urlRecordService, 
     IStoreMappingService storeMappingService)
 {
     this._productService = productService;
     this._productAttributeService = productAttributeService;
     this._languageService = languageService;
     this._localizedEntityService = localizedEntityService;
     this._pictureService = pictureService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._specificationAttributeService = specificationAttributeService;
     this._downloadService = downloadService;
     this._productAttributeParser = productAttributeParser;
     this._urlRecordService = urlRecordService;
     this._storeMappingService = storeMappingService;
 }
Ejemplo n.º 31
0
 public BaseController(IConfiguration configuration, IMemoryCache cache, IBranchContactService branchContactService,
                       IMenuService menuService, ISettingService settingService, ISocialNetworkService socialNetworkService, ILanguageService languageService)
 {
     _configuration        = configuration;
     _cache                = cache;
     _settingService       = settingService;
     _socialNetworkService = socialNetworkService;
     _menuService          = menuService;
     _branchContactService = branchContactService;
     _languageService      = languageService;
 }
 public GoogleAuthenticationPlugin(ISettingService settingService, ITranslationService translationService, ILanguageService languageService)
 {
     _settingService     = settingService;
     _translationService = translationService;
     _languageService    = languageService;
 }
Ejemplo n.º 33
0
 public CommonController(ICommonServices services, ILanguageService language)
 {
     _services = services;
     _language = language;
 }
 /// <summary>
 /// Initializes a new instance of the ApplicationSettingsViewModel class.
 /// </summary>
 public ApplicationSettingsViewModel(ILanguageService languageService)
 {
     _languageService = languageService;
     RegisterCommands();
 }
Ejemplo n.º 35
0
 public FileTypeResolver(ILog log, ILanguageService languageService, IShellProjectService shellProjectService)
 {
     _log                 = log;
     _languageService     = languageService;
     _shellProjectService = shellProjectService;
 }
 public CheckMoneyOrderPaymentProcessor(CheckMoneyOrderPaymentSettings checkMoneyOrderPaymentSettings,
                                        ISettingService settingService, IOrderTotalCalculationService orderTotalCalculationService,
                                        ILocalizationService localizationService, IWebHelper webHelper, ILanguageService languageService)
 {
     _checkMoneyOrderPaymentSettings = checkMoneyOrderPaymentSettings;
     _settingService = settingService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _localizationService          = localizationService;
     _webHelper       = webHelper;
     _languageService = languageService;
 }
Ejemplo n.º 37
0
 /// <summary>
 /// Add locales for localizable entities
 /// </summary>
 /// <typeparam name="TLocalizedModelLocal">Localizable model</typeparam>
 /// <param name="languageService">Language service</param>
 /// <param name="locales">Locales</param>
 protected virtual void AddLocales <TLocalizedModelLocal>(ILanguageService languageService, IList <TLocalizedModelLocal> locales) where TLocalizedModelLocal : ILocalizedModelLocal
 {
     AddLocales(languageService, locales, null);
 }
Ejemplo n.º 38
0
        public CommonController(ICategoryService categoryService,
                                IProductService productService,
                                IManufacturerService manufacturerService,
                                ITopicService topicService,
                                ILanguageService languageService,
                                ICurrencyService currencyService,
                                ILocalizationService localizationService,
                                IWorkContext workContext,
                                IStoreContext storeContext,
                                IQueuedEmailService queuedEmailService,
                                IEmailAccountService emailAccountService,
                                ISitemapGenerator sitemapGenerator,
                                IThemeContext themeContext,
                                IThemeProvider themeProvider,
                                IForumService forumService,
                                IGenericAttributeService genericAttributeService,
                                IWebHelper webHelper,
                                IPermissionService permissionService,
                                ICacheManager cacheManager,
                                ICustomerActivityService customerActivityService,
                                IVendorService vendorService,
                                CustomerSettings customerSettings,
                                TaxSettings taxSettings,
                                CatalogSettings catalogSettings,
                                StoreInformationSettings storeInformationSettings,
                                EmailAccountSettings emailAccountSettings,
                                CommonSettings commonSettings,
                                BlogSettings blogSettings,
                                NewsSettings newsSettings,
                                ForumSettings forumSettings,
                                LocalizationSettings localizationSettings,
                                CaptchaSettings captchaSettings,
                                VendorSettings vendorSettings)
        {
            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._storeContext            = storeContext;
            this._queuedEmailService      = queuedEmailService;
            this._emailAccountService     = emailAccountService;
            this._sitemapGenerator        = sitemapGenerator;
            this._themeContext            = themeContext;
            this._themeProvider           = themeProvider;
            this._forumservice            = forumService;
            this._genericAttributeService = genericAttributeService;
            this._webHelper               = webHelper;
            this._permissionService       = permissionService;
            this._cacheManager            = cacheManager;
            this._customerActivityService = customerActivityService;
            this._vendorService           = vendorService;

            this._customerSettings         = customerSettings;
            this._taxSettings              = taxSettings;
            this._catalogSettings          = catalogSettings;
            this._storeInformationSettings = storeInformationSettings;
            this._emailAccountSettings     = emailAccountSettings;
            this._commonSettings           = commonSettings;
            this._blogSettings             = blogSettings;
            this._newsSettings             = newsSettings;
            this._forumSettings            = forumSettings;
            this._localizationSettings     = localizationSettings;
            this._captchaSettings          = captchaSettings;
            this._vendorSettings           = vendorSettings;
        }
Ejemplo n.º 39
0
        /// <summary>
        /// Add a locale resource (if new) or update an existing one
        /// </summary>
        /// <param name="plugin">Plugin</param>
        /// <param name="localizationService">Localization service</param>
        /// <param name="languageService">Language service</param>
        /// <param name="resourceName">Resource name</param>
        /// <param name="resourceValue">Resource value</param>
        public static void AddOrUpdatePluginLocaleResource(this BasePlugin plugin,
                                                           ILocalizationService localizationService, ILanguageService languageService,
                                                           string resourceName, string resourceValue)
        {
            //actually plugin instance is not required
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }
            if (localizationService == null)
            {
                throw new ArgumentNullException("localizationService");
            }
            if (languageService == null)
            {
                throw new ArgumentNullException("languageService");
            }

            foreach (var lang in languageService.GetAllLanguages(true))
            {
                var lsr = localizationService.GetLocaleStringResourceByName(resourceName, lang.Id, false);
                if (lsr == null)
                {
                    lsr = new LocaleStringResource()
                    {
                        LanguageId    = lang.Id,
                        ResourceName  = resourceName,
                        ResourceValue = resourceValue
                    };
                    localizationService.InsertLocaleStringResource(lsr);
                }
                else
                {
                    lsr.ResourceValue = resourceValue;
                    localizationService.UpdateLocaleStringResource(lsr);
                }
            }
        }
Ejemplo n.º 40
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="UIVisualizerService" /> class.
        /// </summary>
        /// <exception cref="System.ArgumentNullException">The <paramref name="viewLocator" /> is <c>null</c>.</exception>
        /// <exception cref="System.ArgumentNullException">The <paramref name="typeFactory" /> is <c>null</c>.</exception>
        /// <exception cref="System.ArgumentNullException">The <paramref name="languageService" /> is <c>null</c>.</exception>
        public UIVisualizerService(IViewLocator viewLocator, ITypeFactory typeFactory, ILanguageService languageService)
        {
            Argument.IsNotNull(() => viewLocator);
            Argument.IsNotNull(() => typeFactory);
            Argument.IsNotNull(() => languageService);

            _viewLocator     = viewLocator;
            _typeFactory     = typeFactory;
            _languageService = languageService;
        }
        public new void SetUp()
        {
            _workContext = null;
            _services    = MockRepository.GenerateMock <ICommonServices>();

            _store = new Store()
            {
                Id = 1
            };
            _storeContext = MockRepository.GenerateMock <IStoreContext>();
            _storeContext.Expect(x => x.CurrentStore).Return(_store);

            var pluginFinder = PluginFinder.Current;

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

            //price calculation service
            _discountService         = MockRepository.GenerateMock <IDiscountService>();
            _categoryService         = MockRepository.GenerateMock <ICategoryService>();
            _manufacturerService     = MockRepository.GenerateMock <IManufacturerService>();
            _productAttributeParser  = MockRepository.GenerateMock <IProductAttributeParser>();
            _productAttributeService = MockRepository.GenerateMock <IProductAttributeService>();
            _genericAttributeService = MockRepository.GenerateMock <IGenericAttributeService>();
            _eventPublisher          = MockRepository.GenerateMock <IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything));

            _localizationService = MockRepository.GenerateMock <ILocalizationService>();
            _settingService      = MockRepository.GenerateMock <ISettingService>();
            _cartRuleProvider    = MockRepository.GenerateMock <ICartRuleProvider>();

            //shipping
            _shippingSettings = new ShippingSettings();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List <string>();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");
            _shippingMethodRepository = MockRepository.GenerateMock <IRepository <ShippingMethod> >();
            _storeMappingRepository   = MockRepository.GenerateMock <IRepository <StoreMapping> >();

            _shippingService = new ShippingService(
                _shippingMethodRepository,
                _storeMappingRepository,
                _productAttributeParser,
                _productService,
                _checkoutAttributeParser,
                _genericAttributeService,
                _shippingSettings,
                _settingService,
                this.ProviderManager,
                _services,
                _cartRuleProvider);

            _shipmentService = MockRepository.GenerateMock <IShipmentService>();

            _paymentService          = MockRepository.GenerateMock <IPaymentService>();
            _providerManager         = MockRepository.GenerateMock <IProviderManager>();
            _checkoutAttributeParser = MockRepository.GenerateMock <ICheckoutAttributeParser>();
            _giftCardService         = MockRepository.GenerateMock <IGiftCardService>();

            //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
            });
            _downloadService  = MockRepository.GenerateMock <IDownloadService>();
            _httpRequestBase  = MockRepository.GenerateMock <HttpRequestBase>();
            _geoCountryLookup = MockRepository.GenerateMock <IGeoCountryLookup>();

            _taxService = new TaxService(_addressService, _workContext, _taxSettings, _shoppingCartSettings, pluginFinder, _geoCountryLookup, this.ProviderManager);

            _rewardPointsSettings = new RewardPointsSettings();

            _priceCalcService = new PriceCalculationService(_discountService, _categoryService, _manufacturerService, _productAttributeParser, _productService,
                                                            _catalogSettings, _productAttributeService, _downloadService, _services, _httpRequestBase, _taxService, _taxSettings);

            _orderTotalCalcService = new OrderTotalCalculationService(_workContext, _storeContext,
                                                                      _priceCalcService, _taxService, _shippingService, _providerManager,
                                                                      _checkoutAttributeParser, _discountService, _giftCardService, _genericAttributeService, _paymentService, _currencyService, _productAttributeParser,
                                                                      _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>();
            _messageFactory                = MockRepository.GenerateMock <IMessageFactory>();
            _customerActivityService       = MockRepository.GenerateMock <ICustomerActivityService>();
            _currencyService               = MockRepository.GenerateMock <ICurrencyService>();
            _affiliateService              = MockRepository.GenerateMock <IAffiliateService>();
            _newsLetterSubscriptionService = MockRepository.GenerateMock <INewsLetterSubscriptionService>();
            _affiliateService              = MockRepository.GenerateMock <IAffiliateService>();
            _checkoutAttributeParser       = MockRepository.GenerateMock <ICheckoutAttributeParser>();
            _downloadService               = MockRepository.GenerateMock <IDownloadService>();

            _orderSettings        = new OrderSettings();
            _localizationSettings = new LocalizationSettings();

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

            _orderProcessingService = new OrderProcessingService(_orderService, _webHelper,
                                                                 _localizationService, _languageService,
                                                                 _productService, _paymentService,
                                                                 _orderTotalCalcService, _priceCalcService, _priceFormatter,
                                                                 _productAttributeParser, _productAttributeFormatter,
                                                                 _giftCardService, _shoppingCartService, _checkoutAttributeFormatter, _checkoutAttributeParser,
                                                                 _shippingService, _shipmentService, _taxService,
                                                                 _customerService, _discountService,
                                                                 _encryptionService, _workContext, _storeContext,
                                                                 _messageFactory, _customerActivityService, _currencyService, _affiliateService,
                                                                 _eventPublisher, _genericAttributeService,
                                                                 _newsLetterSubscriptionService, _downloadService,
                                                                 _rewardPointsSettings,
                                                                 _orderSettings, _taxSettings, _localizationSettings,
                                                                 _shoppingCartSettings,
                                                                 _catalogSettings);
        }
        public void TestInitialize()
        {
            _workContext = null;

            _store = new Store {
                Id = "1"
            };
            var tempStoreContext = new Mock <IStoreContext>();
            {
                tempStoreContext.Setup(x => x.CurrentStore).Returns(_store);
                _storeContext = tempStoreContext.Object;
            }

            var pluginFinder = new PluginFinder(_serviceProvider);

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

            var tempEventPublisher = new Mock <IMediator>();
            {
                //tempEventPublisher.Setup(x => x.PublishAsync(It.IsAny<object>()));
                _eventPublisher = tempEventPublisher.Object;
            }
            var cacheManager = new TestMemoryCacheManager(new Mock <IMemoryCache>().Object, _eventPublisher);

            _productService = new Mock <IProductService>().Object;

            //price calculation service
            _discountService           = new Mock <IDiscountService>().Object;
            _categoryService           = new Mock <ICategoryService>().Object;
            _manufacturerService       = new Mock <IManufacturerService>().Object;
            _customerService           = new Mock <ICustomerService>().Object;
            _customerProductService    = new Mock <ICustomerProductService>().Object;
            _productReservationService = new Mock <IProductReservationService>().Object;
            _currencyService           = new Mock <ICurrencyService>().Object;
            _auctionService            = new Mock <IAuctionService>().Object;
            _serviceProvider           = new Mock <IServiceProvider>().Object;
            _stateProvinceService      = new Mock <IStateProvinceService>().Object;

            _productAttributeParser = new Mock <IProductAttributeParser>().Object;
            _priceCalcService       = new PriceCalculationService(_workContext, _storeContext,
                                                                  _discountService, _categoryService, _manufacturerService,
                                                                  _productAttributeParser, _productService, _customerProductService,
                                                                  _vendorService, _currencyService, _shoppingCartSettings, _catalogSettings);



            _localizationService = new Mock <ILocalizationService>().Object;

            //shipping
            _shippingSettings = new ShippingSettings();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List <string>();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");
            _shippingMethodRepository = new Mock <IRepository <ShippingMethod> >().Object;
            _deliveryDateRepository   = new Mock <IRepository <DeliveryDate> >().Object;
            _warehouseRepository      = new Mock <IRepository <Warehouse> >().Object;

            _logger          = new NullLogger();
            _shippingService = new ShippingService(_shippingMethodRepository,
                                                   _deliveryDateRepository,
                                                   _warehouseRepository,
                                                   null,
                                                   _logger,
                                                   _productService,
                                                   _productAttributeParser,
                                                   _checkoutAttributeParser,
                                                   _localizationService,
                                                   _addressService,
                                                   _countryService,
                                                   _stateProvinceService,
                                                   pluginFinder,
                                                   _eventPublisher,
                                                   _currencyService,
                                                   cacheManager,
                                                   _shoppingCartSettings,
                                                   _shippingSettings);
            _shipmentService = new Mock <IShipmentService>().Object;

            tempPaymentService = new Mock <IPaymentService>();
            {
                _paymentService = tempPaymentService.Object;
            }
            _checkoutAttributeParser = new Mock <ICheckoutAttributeParser>().Object;
            _giftCardService         = new Mock <IGiftCardService>().Object;
            _genericAttributeService = new Mock <IGenericAttributeService>().Object;

            _geoLookupService = new Mock <IGeoLookupService>().Object;
            _countryService   = new Mock <ICountryService>().Object;
            _customerSettings = new CustomerSettings();
            _addressSettings  = new AddressSettings();

            //tax
            _taxSettings = new TaxSettings
            {
                ShippingIsTaxable = true,
                PaymentMethodAdditionalFeeIsTaxable = true,
                DefaultTaxAddressId = "10"
            };

            var tempAddressService = new Mock <IAddressService>();

            {
                tempAddressService.Setup(x => x.GetAddressByIdSettings(_taxSettings.DefaultTaxAddressId))
                .ReturnsAsync(new Address {
                    Id = _taxSettings.DefaultTaxAddressId
                });
                _addressService = tempAddressService.Object;
            }

            _taxService = new TaxService(_addressService, _workContext, pluginFinder, _geoLookupService, _countryService, _logger, _taxSettings, _customerSettings, _addressSettings);

            _rewardPointsSettings = new RewardPointsSettings();

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

            _orderService               = new Mock <IOrderService>().Object;
            _webHelper                  = new Mock <IWebHelper>().Object;
            _languageService            = new Mock <ILanguageService>().Object;
            _priceFormatter             = new Mock <IPriceFormatter>().Object;
            _productAttributeFormatter  = new Mock <IProductAttributeFormatter>().Object;
            _shoppingCartService        = new Mock <IShoppingCartService>().Object;
            _checkoutAttributeFormatter = new Mock <ICheckoutAttributeFormatter>().Object;
            _encryptionService          = new Mock <IEncryptionService>().Object;
            _workflowMessageService     = new Mock <IWorkflowMessageService>().Object;
            _customerActivityService    = new Mock <ICustomerActivityService>().Object;
            _currencyService            = new Mock <ICurrencyService>().Object;
            _affiliateService           = new Mock <IAffiliateService>().Object;
            _vendorService              = new Mock <IVendorService>().Object;
            _pdfService                 = new Mock <IPdfService>().Object;

            _paymentSettings = new PaymentSettings
            {
                ActivePaymentMethodSystemNames = new List <string>
                {
                    "Payments.TestMethod"
                }
            };
            _orderSettings        = new OrderSettings();
            _localizationSettings = new LocalizationSettings();
            ICustomerActionEventService tempICustomerActionEventService = new Mock <ICustomerActionEventService>().Object;

            _orderProcessingService = new OrderProcessingService(_orderService, _webHelper,
                                                                 _localizationService, _languageService,
                                                                 _productService, _paymentService, _logger,
                                                                 _orderTotalCalcService, _priceCalcService, _priceFormatter,
                                                                 _productAttributeParser, _productAttributeFormatter,
                                                                 _giftCardService, _shoppingCartService, _checkoutAttributeFormatter,
                                                                 _shippingService, _taxService,
                                                                 _customerService, _discountService,
                                                                 _encryptionService, _workContext,
                                                                 _workflowMessageService, _vendorService,
                                                                 _currencyService, _affiliateService,
                                                                 _eventPublisher, _pdfService, null, _storeContext, _productReservationService, _auctionService, _countryService,
                                                                 _shippingSettings, _shoppingCartSettings, _paymentSettings,
                                                                 _orderSettings, _taxSettings, _localizationSettings);
        }
Ejemplo n.º 43
0
        public JsonModelBinder(IJsonHelper jsonHelper, ILocalizationService localizationService, ILanguageService languageService)
        {
            _jsonHelper          = jsonHelper;
            _localizationService = localizationService;

            // Languages are ordered by display order so the first language will be with the smallest display order.
            var firstLanguage = languageService.GetAllLanguages().FirstOrDefault();

            if (firstLanguage != null)
            {
                _languageId = firstLanguage.Id;
            }
            else
            {
                _languageId = 0;
            }
        }
Ejemplo n.º 44
0
        /// <summary>
        /// Delete a locale resource
        /// </summary>
        /// <param name="plugin">Plugin</param>
        /// <param name="localizationService">Localization service</param>
        /// <param name="languageService">Language service</param>
        /// <param name="resourceName">Resource name</param>
        public static void DeletePluginLocaleResource(this BasePlugin plugin,
                                                      ILocalizationService localizationService, ILanguageService languageService,
                                                      string resourceName)
        {
            //actually plugin instance is not required
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }
            if (localizationService == null)
            {
                throw new ArgumentNullException("localizationService");
            }
            if (languageService == null)
            {
                throw new ArgumentNullException("languageService");
            }

            foreach (var lang in languageService.GetAllLanguages(true))
            {
                var lsr = localizationService.GetLocaleStringResourceByName(resourceName, lang.Id, false);
                if (lsr != null)
                {
                    localizationService.DeleteLocaleStringResource(lsr);
                }
            }
        }
Ejemplo n.º 45
0
 public CommonModelFactory(AdminAreaSettings adminAreaSettings,
                           AppSettings appSettings,
                           CatalogSettings catalogSettings,
                           CurrencySettings currencySettings,
                           IActionContextAccessor actionContextAccessor,
                           IAuthenticationPluginManager authenticationPluginManager,
                           IBaseAdminModelFactory baseAdminModelFactory,
                           ICurrencyService currencyService,
                           ICustomerService customerService,
                           IEventPublisher eventPublisher,
                           INopDataProvider dataProvider,
                           IDateTimeHelper dateTimeHelper,
                           INopFileProvider fileProvider,
                           IExchangeRatePluginManager exchangeRatePluginManager,
                           IHttpContextAccessor httpContextAccessor,
                           ILanguageService languageService,
                           ILocalizationService localizationService,
                           IMaintenanceService maintenanceService,
                           IMeasureService measureService,
                           IMultiFactorAuthenticationPluginManager multiFactorAuthenticationPluginManager,
                           IOrderService orderService,
                           IPaymentPluginManager paymentPluginManager,
                           IPickupPluginManager pickupPluginManager,
                           IPluginService pluginService,
                           IProductService productService,
                           IReturnRequestService returnRequestService,
                           ISearchTermService searchTermService,
                           IServiceCollection serviceCollection,
                           IShippingPluginManager shippingPluginManager,
                           IStaticCacheManager staticCacheManager,
                           IStoreContext storeContext,
                           IStoreService storeService,
                           ITaxPluginManager taxPluginManager,
                           IUrlHelperFactory urlHelperFactory,
                           IUrlRecordService urlRecordService,
                           IWebHelper webHelper,
                           IWidgetPluginManager widgetPluginManager,
                           IWorkContext workContext,
                           MeasureSettings measureSettings,
                           NopHttpClient nopHttpClient,
                           ProxySettings proxySettings)
 {
     _adminAreaSettings                      = adminAreaSettings;
     _appSettings                            = appSettings;
     _catalogSettings                        = catalogSettings;
     _currencySettings                       = currencySettings;
     _actionContextAccessor                  = actionContextAccessor;
     _authenticationPluginManager            = authenticationPluginManager;
     _baseAdminModelFactory                  = baseAdminModelFactory;
     _currencyService                        = currencyService;
     _customerService                        = customerService;
     _eventPublisher                         = eventPublisher;
     _dataProvider                           = dataProvider;
     _dateTimeHelper                         = dateTimeHelper;
     _exchangeRatePluginManager              = exchangeRatePluginManager;
     _httpContextAccessor                    = httpContextAccessor;
     _languageService                        = languageService;
     _localizationService                    = localizationService;
     _maintenanceService                     = maintenanceService;
     _measureService                         = measureService;
     _multiFactorAuthenticationPluginManager = multiFactorAuthenticationPluginManager;
     _fileProvider                           = fileProvider;
     _orderService                           = orderService;
     _paymentPluginManager                   = paymentPluginManager;
     _pickupPluginManager                    = pickupPluginManager;
     _pluginService                          = pluginService;
     _productService                         = productService;
     _returnRequestService                   = returnRequestService;
     _searchTermService                      = searchTermService;
     _serviceCollection                      = serviceCollection;
     _shippingPluginManager                  = shippingPluginManager;
     _staticCacheManager                     = staticCacheManager;
     _storeContext                           = storeContext;
     _storeService                           = storeService;
     _taxPluginManager                       = taxPluginManager;
     _urlHelperFactory                       = urlHelperFactory;
     _urlRecordService                       = urlRecordService;
     _webHelper           = webHelper;
     _widgetPluginManager = widgetPluginManager;
     _workContext         = workContext;
     _measureSettings     = measureSettings;
     _nopHttpClient       = nopHttpClient;
     _proxySettings       = proxySettings;
 }
Ejemplo n.º 46
0
 public AmazonPollyService(ApplicationDbContext db, ILanguageService languageService, IOptions <AWSPollyOptions> awsPollyOptions)
 {
     Database         = db;
     _languageService = languageService;
     _awsPollyOptions = awsPollyOptions;
 }
Ejemplo n.º 47
0
 public LanguageController(ILanguageService languageService)
 {
     _languageService = languageService;
 }
 public LocalizationSettingsController(ILocalizationSettingsService localizationSettingsService, ILanguageService languageService)
 {
     _localizationSettingsService = localizationSettingsService;
     _languageService             = languageService;
 }
 public ProductionEquipmentsController(ICompanyService companyService, IFacilityService facilityService, ILanguageService languageService, IProductionEquipmentService productionEquipmentService)
 {
     this.companyService             = companyService;
     this.facilityService            = facilityService;
     this.languageService            = languageService;
     this.productionEquipmentService = productionEquipmentService;
 }
Ejemplo n.º 50
0
 public VendorViewModelService(IDiscountService discountService, IVendorService vendorService, ICustomerService customerService, ILocalizationService localizationService,
                               IDateTimeHelper dateTimeHelper, ICountryService countryService, IStateProvinceService stateProvinceService, IStoreService storeService, IUrlRecordService urlRecordService,
                               IPictureService pictureService, IMediator mediator, VendorSettings vendorSettings, ILanguageService languageService,
                               SeoSettings seoSettings)
 {
     _discountService      = discountService;
     _vendorService        = vendorService;
     _customerService      = customerService;
     _localizationService  = localizationService;
     _dateTimeHelper       = dateTimeHelper;
     _countryService       = countryService;
     _stateProvinceService = stateProvinceService;
     _storeService         = storeService;
     _urlRecordService     = urlRecordService;
     _pictureService       = pictureService;
     _mediator             = mediator;
     _languageService      = languageService;
     _vendorSettings       = vendorSettings;
     _seoSettings          = seoSettings;
 }
Ejemplo n.º 51
0
 /// <summary>
 /// initialise une nouvelle instance de la classe
 /// </summary>
 /// <param name="databaseService"></param>
 /// <param name="navigationService"></param>
 public UserService(IDatabaseService databaseService, INavigationService navigationService, ILanguageService languageService)
 {
     _cryptographyService = DependencyService.Get <ICryptographyService>();
     _navigationService   = navigationService;
     _databaseService     = databaseService;
     _languageService     = languageService;
 }
Ejemplo n.º 52
0
 public GoogleAnalyticPlugin(ISettingService settingService, IWebHelper webHelper, ILocalizationService localizationService, ILanguageService languageService)
 {
     _settingService      = settingService;
     _webHelper           = webHelper;
     _localizationService = localizationService;
     _languageService     = languageService;
 }
Ejemplo n.º 53
0
 public UserController()
 {
     userService     = new UserServiceImpl();
     userwishService = new UserWishServiceImpl();
     languageService = new LanguageServiceImpl();
 }
Ejemplo n.º 54
0
        public ValidationNamesService(ILanguageService languageService)
        {
            Argument.IsNotNull(() => languageService);

            _languageService = languageService;
        }
Ejemplo n.º 55
0
 public LocalizedModelFactory(ILanguageService languageService)
 {
     _languageService = languageService;
 }
Ejemplo n.º 56
0
 public CustomerAttributeParser(ICustomerAttributeService customerAttributeService, ILocalizationService localizationService, IWorkContext workContext, ILanguageService languageService, ILocalizedEntityService localizedEntityService)
 {
     this._customerAttributeService = customerAttributeService;
     this._localizationService      = localizationService;
     this._workContext            = workContext;
     this._languageService        = languageService;
     this._localizedEntityService = localizedEntityService;
 }
Ejemplo n.º 57
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetBlogPostListCommand" /> class.
 /// </summary>
 /// <param name="categoryService">The category service.</param>
 /// <param name="configuration">The configuration.</param>
 /// <param name="languageService">The language service.</param>
 public GetBlogPostListCommand(ICategoryService categoryService, ICmsConfiguration configuration, ILanguageService languageService)
 {
     this.categoryService = categoryService;
     this.configuration   = configuration;
     this.languageService = languageService;
 }
        public ApiPackageRegistry(ILanguageService languageService)
        {
            Argument.IsNotNull(() => languageService);

            _languageService = languageService;
        }
Ejemplo n.º 59
0
        public IntellisenseManager(AvaloniaEdit.TextEditor editor, IIntellisenseControl intellisenseControl, ICompletionAssistant completionAssistant, ILanguageService languageService, ISourceFile file)
        {
            intellisenseJobRunner   = new JobRunner();
            intellisenseQueryRunner = new JobRunner(1);

            Task.Factory.StartNew(() => { intellisenseJobRunner.RunLoop(new CancellationToken()); });
            Task.Factory.StartNew(() => { intellisenseQueryRunner.RunLoop(new CancellationToken()); });

            this.intellisenseControl = intellisenseControl;
            this.completionAssistant = completionAssistant;
            this.languageService     = languageService;
            this.file   = file;
            this.editor = editor;

            this.editor.LostFocus += Editor_LostFocus;
            _hidden = true;

            _shell   = IoC.Get <IShell>();
            _console = IoC.Get <IConsole>();

            var snippetManager = IoC.Get <SnippetManager>();

            _snippets = snippetManager.GetSnippets(languageService, file.Project?.Solution, file.Project);
        }
Ejemplo n.º 60
0
 public TranslationService(ILanguageService languageService)
 {
     _languageService = languageService;
 }