Exemple #1
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,
     IWebHelper webHelper)
 {
     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._webHelper = webHelper;
 }
        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 NasNullCache();

            _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);
        }
Exemple #3
0
        public BlogController(IBlogService blogService, 
            IWorkContext workContext,
            IStoreContext storeContext,
            IPictureService pictureService, 
            ILocalizationService localizationService,
            IDateTimeHelper dateTimeHelper,
            IWorkflowMessageService workflowMessageService, 
            IWebHelper webHelper,
            ICacheManager cacheManager, 
            ICustomerActivityService customerActivityService,
            IStoreMappingService storeMappingService,
            MediaSettings mediaSettings,
            BlogSettings blogSettings,
            LocalizationSettings localizationSettings, 
            CustomerSettings customerSettings,
            CaptchaSettings captchaSettings)
        {
            this._blogService = blogService;
            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._blogSettings = blogSettings;
            this._localizationSettings = localizationSettings;
            this._customerSettings = customerSettings;
            this._captchaSettings = captchaSettings;
        }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="languageRepository">Language repository</param>
 /// <param name="settingService">Setting service</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="eventPublisher">Event published</param>
 public LanguageService(ICacheManager cacheManager,
     IRepository<Language> languageRepository,
     ISettingService settingService,
     LocalizationSettings localizationSettings,
     IEventPublisher eventPublisher)
 {
     this._cacheManager = cacheManager;
     this._languageRepository = languageRepository;
     this._settingService = settingService;
     this._localizationSettings = localizationSettings;
     this._eventPublisher = eventPublisher;
 }
    /// <summary>
    /// Sets the language by string.
    /// 
    /// Return true if the language was found. False otherwise.
    /// </summary>
    /// <returns><c>true</c>, if language was set, <c>false</c> otherwise.</returns>
    /// <param name="language">Language.</param>
    public static bool SetLanguage(string language)
    {
        if (lSettings == null)
            lSettings = Resources.Load<LocalizationSettings> ("Languages/Settings");

        for (int i = 0; i < lSettings.languages.Count; i++) {
            if (lSettings.languages [i].languageName.Equals (language)) {
                SetLanguage (i);
                return true;
            }
        }

        return false;
    }
 public ReturnRequestController(IOrderService orderService,
     ICustomerService customerService, IDateTimeHelper dateTimeHelper,
     ILocalizationService localizationService, IWorkContext workContext,
     IWorkflowMessageService workflowMessageService, LocalizationSettings localizationSettings,
     ICustomerActivityService customerActivityService, IPermissionService permissionService)
 {
     this._orderService = orderService;
     this._customerService = customerService;
     this._dateTimeHelper = dateTimeHelper;
     this._localizationService = localizationService;
     this._workContext = workContext;
     this._workflowMessageService = workflowMessageService;
     this._localizationSettings = localizationSettings;
     this._customerActivityService = customerActivityService;
     this._permissionService = permissionService;
 }
    /// <summary>
    /// Sets the language by index.
    /// 
    /// Return true if the index is a correct language index. False otherwise.
    /// </summary>
    /// <returns><c>true</c>, if language was set, <c>false</c> otherwise.</returns>
    /// <param name="language">Language.</param>
    public static bool SetLanguage(int i)
    {
        if (lSettings == null)
            lSettings = Resources.Load<LocalizationSettings> ("Languages/Settings");

        if (i >= lSettings.languages.Count || i < 0)
            return false;

        lSettings.langIndex = i;

        // Fire changed event
        if (languageChanged != null)
            languageChanged();

        return true;
    }
 public GiftCardController(IGiftCardService giftCardService,
     IPriceFormatter priceFormatter, IWorkflowMessageService workflowMessageService,
     IDateTimeHelper dateTimeHelper, LocalizationSettings localizationSettings,
     ICurrencyService currencyService, CurrencySettings currencySettings,
     ILocalizationService localizationService, ILanguageService languageService,
     ICustomerActivityService customerActivityService, IPermissionService permissionService)
 {
     this._giftCardService = giftCardService;
     this._priceFormatter = priceFormatter;
     this._workflowMessageService = workflowMessageService;
     this._dateTimeHelper = dateTimeHelper;
     this._localizationSettings = localizationSettings;
     this._currencyService = currencyService;
     this._currencySettings = currencySettings;
     this._localizationService = localizationService;
     this._languageService = languageService;
     this._customerActivityService = customerActivityService;
     this._permissionService = permissionService;
 }
    static void Init()
    {
        // Get existing open window or if none, make a new one:
        LocalizationWindow window = (LocalizationWindow)EditorWindow.GetWindow (typeof (LocalizationWindow));
        Rect newRect = window.position;
        newRect.center = new Vector2 (Screen.resolutions [0].width / 2,
                                      Screen.resolutions [0].height / 2);
        window.position = newRect;

        lSettings = (LocalizationSettings)AssetDatabase.LoadAssetAtPath ("Assets/Resources/Languages/Settings.asset", typeof(LocalizationSettings));

        // Create new localization settings if none exist
        if (lSettings == null) {
            lSettings = ScriptableObject.CreateInstance<LocalizationSettings>();
            AssetDatabase.CreateAsset(lSettings,
                                      "Assets/Resources/Languages/Settings.asset");
            AssetDatabase.SaveAssets();
        }
    }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="logger">Logger</param>
 /// <param name="workContext">Work context</param>
 /// <param name="lsrRepository">Locale string resource repository</param>
 /// <param name="languageService">Language service</param>
 /// <param name="dataProvider">Data provider</param>
 /// <param name="dbContext">Database Context</param>
 /// <param name="commonSettings">Common settings</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="eventPublisher">Event published</param>
 public LocalizationService(ICacheManager cacheManager,
     ILogger logger, IWorkContext workContext,
     IRepository<LocaleStringResource> lsrRepository, 
     ILanguageService languageService,
     IDataProvider dataProvider, IDbContext dbContext, CommonSettings commonSettings,
     LocalizationSettings localizationSettings, IEventPublisher eventPublisher)
 {
     this._cacheManager = cacheManager;
     this._logger = logger;
     this._workContext = workContext;
     this._lsrRepository = lsrRepository;
     this._languageService = languageService;
     this._dataProvider = dataProvider;
     this._dbContext = dbContext;
     this._commonSettings = commonSettings;
     this._dataProvider = dataProvider;
     this._dbContext = dbContext;
     this._commonSettings = commonSettings;
     this._localizationSettings = localizationSettings;
     this._eventPublisher = eventPublisher;
 }
Exemple #11
0
 public ProductController(IProductModelFactory productModelFactory,
                          IProductService productService,
                          IWorkContext workContext,
                          IStoreContext storeContext,
                          ILocalizationService localizationService,
                          IWebHelper webHelper,
                          IRecentlyViewedProductsService recentlyViewedProductsService,
                          ICompareProductsService compareProductsService,
                          IWorkflowMessageService workflowMessageService,
                          IOrderService orderService,
                          IAclService aclService,
                          IStoreMappingService storeMappingService,
                          IPermissionService permissionService,
                          ICustomerActivityService customerActivityService,
                          IEventPublisher eventPublisher,
                          CatalogSettings catalogSettings,
                          ShoppingCartSettings shoppingCartSettings,
                          LocalizationSettings localizationSettings,
                          CaptchaSettings captchaSettings)
 {
     this._productModelFactory           = productModelFactory;
     this._productService                = productService;
     this._workContext                   = workContext;
     this._storeContext                  = storeContext;
     this._localizationService           = localizationService;
     this._webHelper                     = webHelper;
     this._recentlyViewedProductsService = recentlyViewedProductsService;
     this._compareProductsService        = compareProductsService;
     this._workflowMessageService        = workflowMessageService;
     this._orderService                  = orderService;
     this._aclService                    = aclService;
     this._storeMappingService           = storeMappingService;
     this._permissionService             = permissionService;
     this._customerActivityService       = customerActivityService;
     this._eventPublisher                = eventPublisher;
     this._catalogSettings               = catalogSettings;
     this._shoppingCartSettings          = shoppingCartSettings;
     this._localizationSettings          = localizationSettings;
     this._captchaSettings               = captchaSettings;
 }
Exemple #12
0
        public NewsController(
            INewsService newsService,
            IWorkContext workContext,
            IStoreContext storeContext,
            IPictureService pictureService,
            ILocalizationService localizationService,
            ICustomerContentService customerContentService,
            IDateTimeHelper dateTimeHelper,
            IWebHelper webHelper,
            ICacheManager cacheManager,
            ICustomerActivityService customerActivityService,
            IStoreMappingService storeMappingService,
            ILanguageService languageService,
            IGenericAttributeService genericAttributeService,
            MediaSettings mediaSettings,
            NewsSettings newsSettings,
            LocalizationSettings localizationSettings,
            CustomerSettings customerSettings,
            CaptchaSettings captchaSettings)
        {
            _newsService            = newsService;
            _workContext            = workContext;
            _storeContext           = storeContext;
            _pictureService         = pictureService;
            _localizationService    = localizationService;
            _customerContentService = customerContentService;
            _dateTimeHelper         = dateTimeHelper;
            _webHelper               = webHelper;
            _cacheManager            = cacheManager;
            _customerActivityService = customerActivityService;
            _storeMappingService     = storeMappingService;
            _languageService         = languageService;
            _genericAttributeService = genericAttributeService;

            _mediaSettings        = mediaSettings;
            _newsSettings         = newsSettings;
            _localizationSettings = localizationSettings;
            _customerSettings     = customerSettings;
            _captchaSettings      = captchaSettings;
        }
 public CommonController(CaptchaSettings captchaSettings,
                         CommonSettings commonSettings,
                         ICommonModelFactory commonModelFactory,
                         ICurrencyService currencyService,
                         ICustomerActivityService customerActivityService,
                         IGenericAttributeService genericAttributeService,
                         ILanguageService languageService,
                         ILocalizationService localizationService,
                         ILogger logger,
                         IStoreContext storeContext,
                         IThemeContext themeContext,
                         IVendorService vendorService,
                         IWorkContext workContext,
                         IWorkflowMessageService workflowMessageService,
                         LocalizationSettings localizationSettings,
                         SitemapSettings sitemapSettings,
                         SitemapXmlSettings sitemapXmlSettings,
                         StoreInformationSettings storeInformationSettings,
                         VendorSettings vendorSettings)
 {
     _captchaSettings         = captchaSettings;
     _commonSettings          = commonSettings;
     _commonModelFactory      = commonModelFactory;
     _currencyService         = currencyService;
     _customerActivityService = customerActivityService;
     _genericAttributeService = genericAttributeService;
     _languageService         = languageService;
     _localizationService     = localizationService;
     _logger                   = logger;
     _storeContext             = storeContext;
     _themeContext             = themeContext;
     _vendorService            = vendorService;
     _workContext              = workContext;
     _workflowMessageService   = workflowMessageService;
     _localizationSettings     = localizationSettings;
     _sitemapSettings          = sitemapSettings;
     _sitemapXmlSettings       = sitemapXmlSettings;
     _storeInformationSettings = storeInformationSettings;
     _vendorSettings           = vendorSettings;
 }
 public SitemapGenerator(BlogSettings blogSettings,
                         ForumSettings forumSettings,
                         IActionContextAccessor actionContextAccessor,
                         IBlogService blogService,
                         ICategoryService categoryService,
                         ILanguageService languageService,
                         IManufacturerService manufacturerService,
                         INewsService newsService,
                         IProductService productService,
                         IProductTagService productTagService,
                         IStoreContext storeContext,
                         ITopicService topicService,
                         IUrlHelperFactory urlHelperFactory,
                         IUrlRecordService urlRecordService,
                         IWebHelper webHelper,
                         LocalizationSettings localizationSettings,
                         NewsSettings newsSettings,
                         SecuritySettings securitySettings,
                         SitemapXmlSettings sitemapSettings)
 {
     _blogSettings          = blogSettings;
     _forumSettings         = forumSettings;
     _actionContextAccessor = actionContextAccessor;
     _blogService           = blogService;
     _categoryService       = categoryService;
     _languageService       = languageService;
     _manufacturerService   = manufacturerService;
     _newsService           = newsService;
     _productService        = productService;
     _productTagService     = productTagService;
     _storeContext          = storeContext;
     _topicService          = topicService;
     _urlHelperFactory      = urlHelperFactory;
     _urlRecordService      = urlRecordService;
     _webHelper             = webHelper;
     _localizationSettings  = localizationSettings;
     _newsSettings          = newsSettings;
     _securitySettings      = securitySettings;
     _sitemapXmlSettings    = sitemapSettings;
 }
 public AppointmentService(IRepository <Appointment> newAppointmentRepository,
                           IEventPublisher eventPublisher,
                           IStoreContext storeContext,
                           IMessageTemplateService messageTemplateService,
                           IWorkflowMessageService workflowMessageService,
                           IMessageTokenProvider messageTokenProvider,
                           IEmailAccountService emailAccountService,
                           EmailAccountSettings emailAccountSettings,
                           IWorkContext workContext,
                           LocalizationSettings localizationSettings)
 {
     _newAppointmentRepository = newAppointmentRepository;
     _eventPublisher           = eventPublisher;
     _storeContext             = storeContext;
     _messageTemplateService   = messageTemplateService;
     _workflowMessageService   = workflowMessageService;
     _messageTokenProvider     = messageTokenProvider;
     _emailAccountService      = emailAccountService;
     _emailAccountSettings     = emailAccountSettings;
     _workContext          = workContext;
     _localizationSettings = localizationSettings;
 }
        protected override void OnInspectorGUI(LocalizationSettings settings, LocalizationServiceItem item, System.Action onReset, GUISkin skin)
        {
            //var data = FlowSystem.GetData();

            GUILayout.Label("URL:");
            var newKey = GUILayout.TextArea(settings.url);

            if (newKey != settings.url)
            {
                settings.url = newKey;
                UnityEditor.EditorUtility.SetDirty(settings);
            }

            UnityEditor.EditorGUI.BeginDisabledGroup(item.processing);
            if (GUILayout.Button(item.processing == true ? "Loading..." : "Load", skin.button) == true)
            {
                if (item.processing == false)
                {
                    item.processing = true;

                    // Connecting
                    this.OnEditorAuth(item.authKey, (result) => {
                        //UnityEditor.EditorApplication.delayCall += () => {

                        this.StartCoroutine(this.GetData(settings.url, (res) => {
                            if (res.hasError == false)
                            {
                                LocalizationSystem.TryToSaveCSV(res.data);
                            }

                            item.processing = false;
                        }));

                        //};
                    });
                }
            }
            UnityEditor.EditorGUI.EndDisabledGroup();
        }
        public ReturnRequestController(IOrderService orderService,
                                       IWorkContext workContext,
                                       ICurrencyService currencyService, IPriceFormatter priceFormatter,
                                       IOrderProcessingService orderProcessingService,
                                       ILocalizationService localizationService,
                                       ICustomerService customerService,
                                       IWorkflowMessageService workflowMessageService,
                                       LocalizationSettings localizationSettings,
                                       OrderSettings orderSettings)
        {
            this._orderService           = orderService;
            this._workContext            = workContext;
            this._currencyService        = currencyService;
            this._priceFormatter         = priceFormatter;
            this._orderProcessingService = orderProcessingService;
            this._localizationService    = localizationService;
            this._customerService        = customerService;
            this._workflowMessageService = workflowMessageService;

            this._localizationSettings = localizationSettings;
            this._orderSettings        = orderSettings;
        }
Exemple #18
0
        private void SetBrowserLanguage()
        {
            string browserLanguage = Request.ServerVariables["http_accept_language"].Split(",".ToCharArray())[0] as string;

            if (Session["BrowserLanguage"] as string != browserLanguage)
            {
                Session["BrowserLanguage"] = browserLanguage;
                string pageDirection       = "";
                bool   isSupportedLanguage = LocalizationSettings.IsSupportedLanguage(browserLanguage, out pageDirection);
                if (!isSupportedLanguage)
                {
                    browserLanguage = "en-US";
                }
                // browserLanguage = "en-US"; //Remove after localization complete
                Session["selectedCulture"] = browserLanguage;
                PageHtml.Attributes.Add("dir", pageDirection);

                CultureInfo cultureInfo = new CultureInfo(Session["selectedCulture"] as string);
                Thread.CurrentThread.CurrentCulture   = cultureInfo;
                Thread.CurrentThread.CurrentUICulture = cultureInfo;
            }
        }
 public VendorViewModelService(
     IWorkContext workContext,
     IVendorService vendorService,
     IDateTimeHelper dateTimeHelper,
     IWorkflowMessageService workflowMessageService,
     IServiceProvider serviceProvider,
     VendorSettings vendorSettings,
     CustomerSettings customerSettings,
     CaptchaSettings captchaSettings,
     LocalizationSettings localizationSettings)
 {
     _workContext            = workContext;
     _vendorService          = vendorService;
     _vendorService          = vendorService;
     _dateTimeHelper         = dateTimeHelper;
     _workflowMessageService = workflowMessageService;
     _serviceProvider        = serviceProvider;
     _vendorSettings         = vendorSettings;
     _customerSettings       = customerSettings;
     _captchaSettings        = captchaSettings;
     _localizationSettings   = localizationSettings;
 }
Exemple #20
0
        public static IServiceCollection AddMvcRazorPagesWithLocalization(
            this IServiceCollection services,
            LocalizationSettings localizationSettings)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            if (localizationSettings == null)
            {
                throw new ArgumentNullException(nameof(localizationSettings));
            }

            services
            .AddMvc()
            .AddMvcLocalization(opts =>
                                opts.DataAnnotationLocalizerProvider =
                                    (type, factory) => factory.Create(typeof(SharedResources)))
            .AddViewLocalization(LanguageViewLocationExpanderFormat.Suffix)
            .SetCompatibilityVersion(CompatibilityVersion.Version_2_1)
            .AddRazorPagesOptions(options =>
            {
                options.AllowAreas = true;

                options.Conventions.AuthorizeAreaFolder("Identity", "/Account/Manage");
                options.Conventions.AuthorizeAreaPage("Identity", "/Account/Logout");
                options.Conventions.AuthorizeAreaFolder("Admin", "/", AppAuthorizationPolicies.RequiresSystemAdministrator);
            });

            services.Configure <RequestLocalizationOptions>(opts =>
            {
                LocalizationHelper.ConfigureLocalizationOptions(
                    opts,
                    localizationSettings);
            });

            return(services.AddLocalization());
        }
Exemple #21
0
 public GiftCardViewModelService(
     IGiftCardService giftCardService, IOrderService orderService,
     IPriceFormatter priceFormatter, IWorkflowMessageService workflowMessageService,
     IDateTimeHelper dateTimeHelper,
     ICurrencyService currencyService, CurrencySettings currencySettings,
     LocalizationSettings localizationSettings,
     ILocalizationService localizationService, ILanguageService languageService,
     ICustomerActivityService customerActivityService, IWorkContext workContext)
 {
     _giftCardService         = giftCardService;
     _orderService            = orderService;
     _priceFormatter          = priceFormatter;
     _workflowMessageService  = workflowMessageService;
     _dateTimeHelper          = dateTimeHelper;
     _currencyService         = currencyService;
     _currencySettings        = currencySettings;
     _localizationSettings    = localizationSettings;
     _localizationService     = localizationService;
     _languageService         = languageService;
     _customerActivityService = customerActivityService;
     _workContext             = workContext;
 }
Exemple #22
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="categoryRepository">ArticleCategory repository</param>
 /// <param name="ArticleArticleCategoryRepository">ArticleArticleCategory repository</param>
 /// <param name="ArticleRepository">Article repository</param>
 /// <param name="aclRepository">ACL record repository</param>
 /// <param name="siteMappingRepository">Site mapping repository</param>
 /// <param name="workContext">Work context</param>
 /// <param name="siteContext">Site context</param>
 /// <param name="eventPublisher">Event publisher</param>
 public ArticleService(ICacheManager cacheManager,
                       IRepository <RelatedArticle> relatedArticleRepository,
                       IRepository <ArticleCategory> categoryRepository,
                       IRepository <Article> articleRepository,
                       IRepository <Picture> pictureRepository,
                       IRepository <ArticleAlbum> articleAlbumRepository,
                       IRepository <ArticleAttribute> articleAttributeRepository,
                       IRepository <SiteMapping> siteMappingRepository,
                       IRepository <LocalizedProperty> localizedPropertyRepository,
                       IRepository <AclRecord> aclRepository,
                       ILanguageService languageService,
                       IWorkflowMessageService workflowMessageService,
                       IDataProvider dataProvider, IDbContext dbContext,
                       IWorkContext workContext,
                       ISiteContext siteContext,
                       LocalizationSettings localizationSettings, CommonSettings commonSettings,
                       IEventPublisher eventPublisher)
 {
     this._relatedArticleRepository    = relatedArticleRepository;
     this._cacheManager                = cacheManager;
     this._categoryRepository          = categoryRepository;
     this._articleRepository           = articleRepository;
     this._pictureRepository           = pictureRepository;
     this._articleAlbumRepository      = articleAlbumRepository;
     this._articleAttributeRepository  = articleAttributeRepository;
     this._localizedPropertyRepository = localizedPropertyRepository;
     this._aclRepository               = aclRepository;
     this._siteMappingRepository       = siteMappingRepository;
     this._languageService             = languageService;
     this._workContext            = workContext;
     this._siteContext            = siteContext;
     this._eventPublisher         = eventPublisher;
     this._commonSettings         = commonSettings;
     this.QuerySettings           = DbQuerySettings.Default;
     this._dataProvider           = dataProvider;
     this._dbContext              = dbContext;
     this._localizationSettings   = localizationSettings;
     this._workflowMessageService = workflowMessageService;
 }
Exemple #23
0
        public ArticleController(
            ICommonServices services,
            IArticleService articleService,
            IUserContentService userContentService,
            IUserService userService,
            IUserActivityService userActivityService,
            IWorkflowMessageService workflowMessageService,
            IAclService aclService,
            ISiteMappingService siteMappingService,
            ArticleCatalogSettings catalogSettings,
            LocalizationSettings localizationSettings,
            ILocalizationService localizationService,
            ArticleCatalogHelper helper, IArticleTagService articleTagService,
            IRecentlyViewedArticlesService recentlyViewedArticlesService,
            CaptchaSettings captchaSettings,
            IWebHelper webHelper,
            IWorkContext workContext
            )
        {
            this._services               = services;
            this._articleService         = articleService;
            this._userContentService     = userContentService;
            this._userService            = userService;
            this._userActivityService    = userActivityService;
            this._workflowMessageService = workflowMessageService;
            this._aclService             = aclService;
            this._siteMappingService     = siteMappingService;
            this._catalogSettings        = catalogSettings;
            this._localizationSettings   = localizationSettings;
            this._localizationService    = localizationService;
            this._helper                        = helper;
            this._articleTagService             = articleTagService;
            this._recentlyViewedArticlesService = recentlyViewedArticlesService;
            this._workContext                   = workContext;
            this._captchaSettings               = captchaSettings;
            this._webHelper                     = webHelper;

            T = NullLocalizer.Instance;
        }
        public void OnPostprocessBuild(BuildReport report)
        {
            if (m_Settings == null || !m_RemoveFromPreloadedAssets)
            {
                return;
            }

            bool wasDirty = IsPlayerSettingsDirty();

            var preloadedAssets = PlayerSettings.GetPreloadedAssets();

            ArrayUtility.Remove(ref preloadedAssets, m_Settings);
            PlayerSettings.SetPreloadedAssets(preloadedAssets);

            m_Settings = null;

            // Clear the dirty flag so we dont flush the modified file (case 1254502)
            if (!wasDirty)
            {
                ClearPlayerSettingsDirtyFlag();
            }
        }
Exemple #25
0
        //[LoadSetting(IsRootedModel = true)]
        public ActionResult GeneralCommon(int storeScope,
                                          StoreInformationSettings storeInformationSettings,
                                          SeoSettings seoSettings,
                                          DateTimeSettings dateTimeSettings,
                                          SecuritySettings securitySettings,
                                          CaptchaSettings captchaSettings,
                                          PdfSettings pdfSettings,
                                          LocalizationSettings localizationSettings,
                                          CompanyInformationSettings companySettings,
                                          ContactDataSettings contactDataSettings,
                                          BankConnectionSettings bankConnectionSettings,
                                          SocialSettings socialSettings,
                                          HomePageSettings homePageSettings)
        {
            // TODO: (mh) (core)
            // Set page timeout to 5 minutes.
            //Server.ScriptTimeout = 300;

            var model = new GeneralCommonSettingsModel();

            return(View(model));
        }
 public IdentityController(
     SmartDbContext db,
     UserManager <Customer> userManager,
     SignInManager <Customer> signInManager,
     RoleManager <CustomerRole> roleManager,
     IUserStore <Customer> userStore,
     ITaxService taxService,
     IAddressService addressService,
     IShoppingCartService shoppingCartService,
     IMessageFactory messageFactory,
     IWebHelper webHelper,
     IDateTimeHelper dateTimeHelper,
     CustomerSettings customerSettings,
     CaptchaSettings captchaSettings,
     DateTimeSettings dateTimeSettings,
     TaxSettings taxSettings,
     LocalizationSettings localizationSettings,
     ExternalAuthenticationSettings externalAuthenticationSettings,
     RewardPointsSettings rewardPointsSettings)
 {
     _db                             = db;
     _userManager                    = userManager;
     _signInManager                  = signInManager;
     _roleManager                    = roleManager;
     _userStore                      = userStore;
     _taxService                     = taxService;
     _addressService                 = addressService;
     _shoppingCartService            = shoppingCartService;
     _messageFactory                 = messageFactory;
     _webHelper                      = webHelper;
     _dateTimeHelper                 = dateTimeHelper;
     _customerSettings               = customerSettings;
     _captchaSettings                = captchaSettings;
     _dateTimeSettings               = dateTimeSettings;
     _taxSettings                    = taxSettings;
     _localizationSettings           = localizationSettings;
     _externalAuthenticationSettings = externalAuthenticationSettings;
     _rewardPointsSettings           = rewardPointsSettings;
 }
Exemple #27
0
 public LocalizationService(ICacheKeyService cacheKeyService,
                            IEventPublisher eventPublisher,
                            ILanguageService languageService,
                            ILocalizedEntityService localizedEntityService,
                            ILogger logger,
                            IRepository <LocaleStringResource> lsrRepository,
                            ISettingService settingService,
                            IStaticCacheManager staticCacheManager,
                            IWorkContext workContext,
                            LocalizationSettings localizationSettings)
 {
     _cacheKeyService        = cacheKeyService;
     _eventPublisher         = eventPublisher;
     _languageService        = languageService;
     _localizedEntityService = localizedEntityService;
     _logger               = logger;
     _lsrRepository        = lsrRepository;
     _settingService       = settingService;
     _staticCacheManager   = staticCacheManager;
     _workContext          = workContext;
     _localizationSettings = localizationSettings;
 }
Exemple #28
0
        public BlogController(IBlogService blogService,
                              IWorkContext workContext,
                              IStoreContext storeContext,
                              IPictureService pictureService,
                              ILocalizationService localizationService,
                              ICustomerContentService customerContentService,
                              IDateTimeHelper dateTimeHelper,
                              IWebHelper webHelper,
                              ICacheManager cacheManager,
                              ICustomerActivityService customerActivityService,
                              IStoreMappingService storeMappingService,
                              ILanguageService languageService,
                              MediaSettings mediaSettings,
                              BlogSettings blogSettings,
                              LocalizationSettings localizationSettings,
                              CustomerSettings customerSettings,
                              CaptchaSettings captchaSettings,
                              SeoSettings seoSettings)
        {
            this._blogService            = blogService;
            this._workContext            = workContext;
            this._storeContext           = storeContext;
            this._pictureService         = pictureService;
            this._localizationService    = localizationService;
            this._customerContentService = customerContentService;
            this._dateTimeHelper         = dateTimeHelper;
            this._webHelper               = webHelper;
            this._cacheManager            = cacheManager;
            this._customerActivityService = customerActivityService;
            this._storeMappingService     = storeMappingService;
            this._languageService         = languageService;

            this._mediaSettings        = mediaSettings;
            this._blogSettings         = blogSettings;
            this._localizationSettings = localizationSettings;
            this._customerSettings     = customerSettings;
            this._captchaSettings      = captchaSettings;
            this._seoSettings          = seoSettings;
        }
Exemple #29
0
        public NewsViewModelService(INewsService newsService, IWorkContext workContext, IStoreContext storeContext,
                                    IPictureService pictureService, IDateTimeHelper dateTimeHelper, ICacheManager cacheManager,
                                    IWorkflowMessageService workflowMessageService, ILocalizationService localizationService, IWebHelper webHelper,
                                    CaptchaSettings captchaSettings, NewsSettings newsSettings,
                                    CustomerSettings customerSettings, MediaSettings mediaSettings, LocalizationSettings localizationSettings)
        {
            this._newsService            = newsService;
            this._workContext            = workContext;
            this._storeContext           = storeContext;
            this._pictureService         = pictureService;
            this._dateTimeHelper         = dateTimeHelper;
            this._cacheManager           = cacheManager;
            this._workflowMessageService = workflowMessageService;
            this._localizationService    = localizationService;
            this._webHelper = webHelper;

            this._captchaSettings      = captchaSettings;
            this._newsSettings         = newsSettings;
            this._customerSettings     = customerSettings;
            this._mediaSettings        = mediaSettings;
            this._localizationSettings = localizationSettings;
        }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="customerSettings">Customer settings</param>
 /// <param name="externalAuthenticationSettings">External authentication settings</param>
 /// <param name="authenticationService">Authentication service</param>
 /// <param name="customerActivityService">Customer activity service</param>
 /// <param name="customerRegistrationService">Customer registration service</param>
 /// <param name="customerService">Customer service</param>
 /// <param name="eventPublisher">Event publisher</param>
 /// <param name="genericAttributeService">Generic attribute service</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="pluginService">Plugin finder</param>
 /// <param name="externalAuthenticationRecordRepository">External authentication record repository</param>
 /// <param name="shoppingCartService">Shopping cart service</param>
 /// <param name="storeContext">Store context</param>
 /// <param name="workContext">Work context</param>
 /// <param name="workflowMessageService">Workflow message service</param>
 /// <param name="localizationSettings">Localization settings</param>
 public ExternalAuthenticationService_Override(
     CustomerSettings customerSettings,
     ExternalAuthenticationSettings externalAuthenticationSettings,
     IAuthenticationPluginManager authenticationPluginManager,
     IAuthenticationService authenticationService,
     ICustomerActivityService customerActivityService,
     ICustomerRegistrationService customerRegistrationService,
     ICustomerService customerService,
     IEventPublisher eventPublisher,
     IGenericAttributeService genericAttributeService,
     ILocalizationService localizationService,
     Data.IRepository <ExternalAuthenticationRecord> externalAuthenticationRecordRepository,
     IShoppingCartService shoppingCartService,
     IStoreContext storeContext,
     IWorkContext workContext,
     IWorkflowMessageService workflowMessageService,
     LocalizationSettings localizationSettings
     ) : base(
         customerSettings,
         externalAuthenticationSettings,
         authenticationPluginManager,
         authenticationService,
         customerActivityService,
         customerRegistrationService,
         customerService,
         eventPublisher,
         genericAttributeService,
         localizationService,
         externalAuthenticationRecordRepository,
         shoppingCartService,
         storeContext,
         workContext,
         workflowMessageService,
         localizationSettings)
 {
     this._customerService             = customerService;
     this._workContext                 = workContext;
     this._authenticationPluginManager = authenticationPluginManager;
 }
 public ProductService(CatalogSettings catalogSettings,
                       CommonSettings commonSettings,
                       IAclService aclService,
                       ICacheManager cacheManager,
                       IDataProvider dataProvider,
                       IDbContext dbContext,
                       IEventPublisher eventPublisher,
                       ILanguageService languageService,
                       ILocalizationService localizationService,
                       IRepository <AclRecord> aclRepository,
                       IRepository <Product> productRepository,
                       IRepository <ProductPicture> productPictureRepository,
                       IRepository <ProductReview> productReviewRepository,
                       IRepository <RelatedProduct> relatedProductRepository,
                       IRepository <StoreMapping> storeMappingRepository,
                       IStoreMappingService storeMappingService,
                       IWorkContext workContext,
                       LocalizationSettings localizationSettings)
 {
     this._catalogSettings          = catalogSettings;
     this._commonSettings           = commonSettings;
     this._aclService               = aclService;
     this._cacheManager             = cacheManager;
     this._dataProvider             = dataProvider;
     this._dbContext                = dbContext;
     this._eventPublisher           = eventPublisher;
     this._languageService          = languageService;
     this._localizationService      = localizationService;
     this._aclRepository            = aclRepository;
     this._productRepository        = productRepository;
     this._productPictureRepository = productPictureRepository;
     this._productReviewRepository  = productReviewRepository;
     this._relatedProductRepository = relatedProductRepository;
     this._storeMappingRepository   = storeMappingRepository;
     this._storeMappingService      = storeMappingService;
     this._workContext              = workContext;
     this._localizationSettings     = localizationSettings;
     this._entityName               = typeof(Product).Name;
 }
Exemple #32
0
    void LoadSettings()
    {
        if (loadedSettings)
        {
            return;
        }
        loadedSettings = true;
        gDocsURL       = EditorPrefs.GetString(PlayerSettings.productName + "gDocs");


        if (File.Exists(settingsAssetPath))
        {
            settings = (LocalizationSettings)AssetDatabase.LoadAssetAtPath(settingsAssetPath, typeof(LocalizationSettings));
        }
        else
        {
            Debug.LogError("does not exist, moved");
        }

        useSystemLang = settings.useSystemLanguagePerDefault;
        langCode      = LocalizationSettings.GetLanguageEnum(settings.defaultLangCode);
    }
Exemple #33
0
 public ShareController(ICommonServices commonServices,
                        ICustomerService customerService,
                        IPlanService planService,
                        ICustomerPlanService customerPlanService,
                        IDateTimeHelper dateTimeHelper,
                        IWorkContext workContext,
                        ITransactionService transactionService,
                        ICommonServices services,
                        ILocalizationService localizationService,
                        LocalizationSettings localizationSettings)
 {
     _commonServices       = commonServices;
     _customerService      = customerService;
     _planService          = planService;
     _customerPlanService  = customerPlanService;
     _dateTimeHelper       = dateTimeHelper;
     _workContext          = workContext;
     _transactionService   = transactionService;
     _services             = services;
     _localizationService  = localizationService;
     _localizationSettings = localizationSettings;
 }
 public ReturnRequestController(IOrderService orderService,
                                IProductService productService,
                                ICustomerService customerService, IDateTimeHelper dateTimeHelper,
                                ILocalizationService localizationService, IWorkContext workContext,
                                IWorkflowMessageService workflowMessageService, LocalizationSettings localizationSettings,
                                ICustomerActivityService customerActivityService, IPermissionService permissionService,
                                IRepository <ReturnRequest> returnRequest,
                                IReturnRequestService returnRequestService)
 {
     this._orderService            = orderService;
     this._productService          = productService;
     this._customerService         = customerService;
     this._dateTimeHelper          = dateTimeHelper;
     this._localizationService     = localizationService;
     this._workContext             = workContext;
     this._workflowMessageService  = workflowMessageService;
     this._localizationSettings    = localizationSettings;
     this._customerActivityService = customerActivityService;
     this._permissionService       = permissionService;
     this._returnRequest           = returnRequest;
     this._returnRequestService    = returnRequestService;
 }
 public ReturnRequestViewModelService(IOrderService orderService,
                                      IWorkContext workContext,
                                      IProductService productService,
                                      ICustomerService customerService, IDateTimeHelper dateTimeHelper,
                                      ILocalizationService localizationService,
                                      IWorkflowMessageService workflowMessageService, LocalizationSettings localizationSettings,
                                      ICustomerActivityService customerActivityService,
                                      IReturnRequestService returnRequestService,
                                      IPriceFormatter priceFormatter,
                                      ICurrencyService currencyService,
                                      AddressSettings addressSettings,
                                      ICountryService countryService,
                                      IStateProvinceService stateProvinceService,
                                      IAddressAttributeService addressAttributeService,
                                      IAddressAttributeParser addressAttributeParser,
                                      IDownloadService downloadService,
                                      OrderSettings orderSettings)
 {
     _orderService            = orderService;
     _workContext             = workContext;
     _productService          = productService;
     _customerService         = customerService;
     _dateTimeHelper          = dateTimeHelper;
     _localizationService     = localizationService;
     _workflowMessageService  = workflowMessageService;
     _localizationSettings    = localizationSettings;
     _customerActivityService = customerActivityService;
     _returnRequestService    = returnRequestService;
     _priceFormatter          = priceFormatter;
     _currencyService         = currencyService;
     _addressSettings         = addressSettings;
     _countryService          = countryService;
     _stateProvinceService    = stateProvinceService;
     _addressAttributeService = addressAttributeService;
     _addressAttributeParser  = addressAttributeParser;
     _downloadService         = downloadService;
     _orderSettings           = orderSettings;
 }
Exemple #36
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="materialRepository">Material repository</param>
 /// <param name="tierPriceRepository">Tier price repository</param>
 /// <param name="localizedPropertyRepository">Localized property repository</param>
 /// <param name="aclRepository">ACL record repository</param>
 /// <param name="storeMappingRepository">Store mapping repository</param>
 /// <param name="stockQuantityHistoryRepository">Stock quantity history repository</param>
 /// <param name="languageService">Language service</param>
 /// <param name="workflowMessageService">Workflow message service</param>
 /// <param name="dataProvider">Data provider</param>
 /// <param name="dbContext">Database Context</param>
 /// <param name="workContext">Work context</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="commonSettings">Common settings</param>
 /// <param name="catalogSettings">Catalog settings</param>
 /// <param name="eventPublisher">Event published</param>
 /// <param name="aclService">ACL service</param>
 /// <param name="storeMappingService">Store mapping service</param>
 public MaterialService(ICacheManager cacheManager,
                        IRepository <Material> materialRepository,
                        IRepository <ProductRecipe> productRecipeRepository,
                        IRepository <LocalizedProperty> localizedPropertyRepository,
                        IRepository <AclRecord> aclRepository,
                        IRepository <StoreMapping> storeMappingRepository,
                        IRepository <MaterialQuantityHistory> stockQuantityHistoryRepository,
                        ILanguageService languageService,
                        IWorkflowMessageService workflowMessageService,
                        IDataProvider dataProvider,
                        IDbContext dbContext,
                        IWorkContext workContext,
                        LocalizationSettings localizationSettings,
                        CommonSettings commonSettings,
                        CatalogSettings catalogSettings,
                        IEventPublisher eventPublisher,
                        IAclService aclService,
                        IStoreMappingService storeMappingService)
 {
     this._cacheManager                   = cacheManager;
     this._materialRepository             = materialRepository;
     this._productRecipeRepository        = productRecipeRepository;
     this._localizedPropertyRepository    = localizedPropertyRepository;
     this._aclRepository                  = aclRepository;
     this._storeMappingRepository         = storeMappingRepository;
     this._stockQuantityHistoryRepository = stockQuantityHistoryRepository;
     this._languageService                = languageService;
     this._workflowMessageService         = workflowMessageService;
     this._dataProvider                   = dataProvider;
     this._dbContext            = dbContext;
     this._workContext          = workContext;
     this._localizationSettings = localizationSettings;
     this._commonSettings       = commonSettings;
     this._catalogSettings      = catalogSettings;
     this._eventPublisher       = eventPublisher;
     this._aclService           = aclService;
     this._storeMappingService  = storeMappingService;
 }
Exemple #37
0
        public BlogController(
            ICommonServices services,
            IBlogService blogService,
            IMediaService mediaService,
            ICustomerContentService customerContentService,
            IDateTimeHelper dateTimeHelper,
            IWebHelper webHelper,
            ICacheManager cacheManager,
            ICustomerActivityService customerActivityService,
            IStoreMappingService storeMappingService,
            ILanguageService languageService,
            IGenericAttributeService genericAttributeService,
            MediaSettings mediaSettings,
            BlogSettings blogSettings,
            LocalizationSettings localizationSettings,
            CustomerSettings customerSettings,
            CaptchaSettings captchaSettings,
            SeoSettings seoSettings)
        {
            _services                = services;
            _blogService             = blogService;
            _mediaService            = mediaService;
            _customerContentService  = customerContentService;
            _dateTimeHelper          = dateTimeHelper;
            _webHelper               = webHelper;
            _cacheManager            = cacheManager;
            _customerActivityService = customerActivityService;
            _storeMappingService     = storeMappingService;
            _languageService         = languageService;
            _genericAttributeService = genericAttributeService;

            _mediaSettings        = mediaSettings;
            _blogSettings         = blogSettings;
            _localizationSettings = localizationSettings;
            _customerSettings     = customerSettings;
            _captchaSettings      = captchaSettings;
            _seoSettings          = seoSettings;
        }
        public CommonController(
            ILanguageService languageService,
            ILocalizationService localizationService,
            IWorkContext workContext, 
            IQueuedEmailService queuedEmailService, 
            IEmailAccountService emailAccountService,
            ISitemapGenerator sitemapGenerator,
            IGenericAttributeService genericAttributeService, 
            IWebHelper webHelper,
            IPermissionService permissionService,
            ICacheManager cacheManager,
            IUserActivityService userActivityService,
            UserSettings userSettings, 
            SiteInformationSettings siteInformationSettings,
            EmailAccountSettings emailAccountSettings,
            CommonSettings commonSettings, 
            LocalizationSettings localizationSettings, 
            CaptchaSettings captchaSettings)
        {
            this._languageService = languageService;
            this._localizationService = localizationService;
            this._workContext = workContext;
            this._queuedEmailService = queuedEmailService;
            this._emailAccountService = emailAccountService;
            this._sitemapGenerator = sitemapGenerator;
            this._genericAttributeService = genericAttributeService;
            this._webHelper = webHelper;
            this._permissionService = permissionService;
            this._cacheManager = cacheManager;
            this._userActivityService = userActivityService;

            this._userSettings = userSettings;
            this._siteInformationSettings = siteInformationSettings;
            this._emailAccountSettings = emailAccountSettings;
            this._commonSettings = commonSettings;
            this._localizationSettings = localizationSettings;
            this._captchaSettings = captchaSettings;
        }
Exemple #39
0
        public new void SetUp()
        {
            _languageRepo = MockRepository.GenerateMock <IRepository <Language> >();
            var lang1 = new Language
            {
                Name              = "English",
                LanguageCulture   = "en-Us",
                FlagImageFileName = "us.png",
                Published         = true,
                DisplayOrder      = 1
            };
            var lang2 = new Language
            {
                Name              = "Russian",
                LanguageCulture   = "ru-Ru",
                FlagImageFileName = "ru.png",
                Published         = true,
                DisplayOrder      = 2
            };

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

            var cacheManager = new NopNullCache();

            _customerService = MockRepository.GenerateMock <ICustomerService>();

            _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,
                                                        _customerService, _settingService, _localizationSettings, _eventPublisher);
        }
Exemple #40
0
 public ReturnRequestController(IOrderService orderService,
                                IProductService productService,
                                ICustomerService customerService, IDateTimeHelper dateTimeHelper,
                                ILocalizationService localizationService, IWorkContext workContext,
                                IWorkflowMessageService workflowMessageService, LocalizationSettings localizationSettings,
                                ICustomerActivityService customerActivityService, IPermissionService permissionService,
                                IRepository <ReturnRequest> returnRequest,
                                IReturnRequestService returnRequestService,
                                IPriceFormatter priceFormatter,
                                ICurrencyService currencyService,
                                AddressSettings addressSettings,
                                ICountryService countryService,
                                IStateProvinceService stateProvinceService,
                                IAddressAttributeService addressAttributeService,
                                IAddressAttributeParser addressAttributeParser,
                                OrderSettings orderSettings)
 {
     this._orderService            = orderService;
     this._productService          = productService;
     this._customerService         = customerService;
     this._dateTimeHelper          = dateTimeHelper;
     this._localizationService     = localizationService;
     this._workContext             = workContext;
     this._workflowMessageService  = workflowMessageService;
     this._localizationSettings    = localizationSettings;
     this._customerActivityService = customerActivityService;
     this._permissionService       = permissionService;
     this._returnRequest           = returnRequest;
     this._returnRequestService    = returnRequestService;
     this._priceFormatter          = priceFormatter;
     this._currencyService         = currencyService;
     this._addressSettings         = addressSettings;
     this._countryService          = countryService;
     this._stateProvinceService    = stateProvinceService;
     this._addressAttributeService = addressAttributeService;
     this._addressAttributeParser  = addressAttributeParser;
     this._orderSettings           = orderSettings;
 }
 public BlogViewModelService(IBlogService blogService,
                             IWorkContext workContext,
                             IStoreContext storeContext,
                             IPictureService pictureService,
                             ILocalizationService localizationService,
                             IDateTimeHelper dateTimeHelper,
                             IWorkflowMessageService workflowMessageService,
                             IWebHelper webHelper,
                             ICacheManager cacheManager,
                             ICustomerActivityService customerActivityService,
                             IStoreMappingService storeMappingService,
                             IPermissionService permissionService,
                             IServiceProvider serviceProvider,
                             MediaSettings mediaSettings,
                             BlogSettings blogSettings,
                             LocalizationSettings localizationSettings,
                             CustomerSettings customerSettings,
                             CaptchaSettings captchaSettings)
 {
     this._blogService            = blogService;
     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._permissionService       = permissionService;
     this._serviceProvider         = serviceProvider;
     this._mediaSettings           = mediaSettings;
     this._blogSettings            = blogSettings;
     this._localizationSettings    = localizationSettings;
     this._customerSettings        = customerSettings;
     this._captchaSettings         = captchaSettings;
 }
        public ReturnRequestController(IOrderService orderService, 
            IWorkContext workContext, IStoreContext storeContext,
            ICurrencyService currencyService, IPriceFormatter priceFormatter,
            IOrderProcessingService orderProcessingService,
            ILocalizationService localizationService,
            ICustomerService customerService,
            IWorkflowMessageService workflowMessageService,
            LocalizationSettings localizationSettings,
            OrderSettings orderSettings)
        {
            this._orderService = orderService;
            this._workContext = workContext;
            this._storeContext = storeContext;
            this._currencyService = currencyService;
            this._priceFormatter = priceFormatter;
            this._orderProcessingService = orderProcessingService;
            this._localizationService = localizationService;
            this._customerService = customerService;
            this._workflowMessageService = workflowMessageService;

            this._localizationSettings = localizationSettings;
            this._orderSettings = orderSettings;
        }
 public ExternalAuthorizer(IAuthenticationService authenticationService,
     IOpenAuthenticationService openAuthenticationService,
     IGenericAttributeService genericAttributeService,
     ICustomerRegistrationService customerRegistrationService, 
     ICustomerActivityService customerActivityService, ILocalizationService localizationService,
     IWorkContext workContext, CustomerSettings customerSettings,
     ExternalAuthenticationSettings externalAuthenticationSettings,
     IShoppingCartService shoppingCartService,
     IWorkflowMessageService workflowMessageService, LocalizationSettings localizationSettings)
 {
     this._authenticationService = authenticationService;
     this._openAuthenticationService = openAuthenticationService;
     this._genericAttributeService = genericAttributeService;
     this._customerRegistrationService = customerRegistrationService;
     this._customerActivityService = customerActivityService;
     this._localizationService = localizationService;
     this._workContext = workContext;
     this._customerSettings = customerSettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._shoppingCartService = shoppingCartService;
     this._workflowMessageService = workflowMessageService;
     this._localizationSettings = localizationSettings;
 }
        public CustomerController(IAuthenticationService authenticationService,
            IDateTimeHelper dateTimeHelper,
            DateTimeSettings dateTimeSettings, 
            TaxSettings taxSettings,
            ILocalizationService localizationService,
            IWorkContext workContext,
            IStoreContext storeContext,
            ICustomerService customerService,
            IGenericAttributeService genericAttributeService,
            ICustomerRegistrationService customerRegistrationService,
            ITaxService taxService, RewardPointsSettings rewardPointsSettings,
            CustomerSettings customerSettings,AddressSettings addressSettings, 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, 
            IDownloadService downloadService, IWebHelper webHelper,
            ICustomerActivityService customerActivityService, 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._storeContext = storeContext;
            this._customerService = customerService;
            this._genericAttributeService = genericAttributeService;
            this._customerRegistrationService = customerRegistrationService;
            this._taxService = taxService;
            this._rewardPointsSettings = rewardPointsSettings;
            this._customerSettings = customerSettings;
            this._addressSettings = addressSettings;
            this._forumSettings = forumSettings;
            this._orderSettings = orderSettings;
            this._addressService = addressService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._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._downloadService = downloadService;
            this._webHelper = webHelper;
            this._customerActivityService = customerActivityService;

            this._mediaSettings = mediaSettings;
            this._workflowMessageService = workflowMessageService;
            this._localizationSettings = localizationSettings;
            this._captchaSettings = captchaSettings;
            this._externalAuthenticationSettings = externalAuthenticationSettings;
        }
Exemple #45
0
        public CatalogController(ICategoryService categoryService, 
            IManufacturerService manufacturerService, IProductService productService, 
            IProductTemplateService productTemplateService,
            ICategoryTemplateService categoryTemplateService,
            IManufacturerTemplateService manufacturerTemplateService,
            IProductAttributeService productAttributeService, IProductAttributeParser productAttributeParser, 
            IWorkContext workContext, IStoreContext storeContext,
            ITaxService taxService, ICurrencyService currencyService,
            IPictureService pictureService, ILocalizationService localizationService,
            IPriceCalculationService priceCalculationService, IPriceFormatter priceFormatter,
            IWebHelper webHelper, ISpecificationAttributeService specificationAttributeService,
            IDateTimeHelper dateTimeHelper,
            IShoppingCartService shoppingCartService,
            IRecentlyViewedProductsService recentlyViewedProductsService, ICompareProductsService compareProductsService,
            IWorkflowMessageService workflowMessageService, IProductTagService productTagService,
            IOrderReportService orderReportService, IGenericAttributeService genericAttributeService,
            IBackInStockSubscriptionService backInStockSubscriptionService, IAclService aclService,
            IStoreMappingService storeMappingService,
            IPermissionService permissionService, IDownloadService downloadService,
            ICustomerActivityService customerActivityService,
            IEventPublisher eventPublisher,
            MediaSettings mediaSettings, CatalogSettings catalogSettings,
            ShoppingCartSettings shoppingCartSettings,
            LocalizationSettings localizationSettings, CustomerSettings customerSettings, 
            CaptchaSettings captchaSettings,
            ICacheManager cacheManager)
        {
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._productService = productService;
            this._productTemplateService = productTemplateService;
            this._categoryTemplateService = categoryTemplateService;
            this._manufacturerTemplateService = manufacturerTemplateService;
            this._productAttributeService = productAttributeService;
            this._productAttributeParser = productAttributeParser;
            this._workContext = workContext;
            this._storeContext = storeContext;
            this._taxService = taxService;
            this._currencyService = currencyService;
            this._pictureService = pictureService;
            this._localizationService = localizationService;
            this._priceCalculationService = priceCalculationService;
            this._priceFormatter = priceFormatter;
            this._webHelper = webHelper;
            this._specificationAttributeService = specificationAttributeService;
            this._dateTimeHelper = dateTimeHelper;
            this._shoppingCartService = shoppingCartService;
            this._recentlyViewedProductsService = recentlyViewedProductsService;
            this._compareProductsService = compareProductsService;
            this._workflowMessageService = workflowMessageService;
            this._productTagService = productTagService;
            this._orderReportService = orderReportService;
            this._genericAttributeService = genericAttributeService;
            this._backInStockSubscriptionService = backInStockSubscriptionService;
            this._aclService = aclService;
            this._storeMappingService = storeMappingService;
            this._permissionService = permissionService;
            this._downloadService = downloadService;
            this._customerActivityService = customerActivityService;
            this._eventPublisher = eventPublisher;

            this._mediaSettings = mediaSettings;
            this._catalogSettings = catalogSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._localizationSettings = localizationSettings;
            this._customerSettings = customerSettings;
            this._captchaSettings = captchaSettings;

            this._cacheManager = cacheManager;
        }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="orderService">Order service</param>
 /// <param name="webHelper">Web helper</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="languageService">Language service</param>
 /// <param name="productService">Product service</param>
 /// <param name="paymentService">Payment service</param>
 /// <param name="logger">Logger</param>
 /// <param name="orderTotalCalculationService">Order total calculationservice</param>
 /// <param name="priceCalculationService">Price calculation service</param>
 /// <param name="priceFormatter">Price formatter</param>
 /// <param name="productAttributeParser">Product attribute parser</param>
 /// <param name="productAttributeFormatter">Product attribute formatter</param>
 /// <param name="giftCardService">Gift card service</param>
 /// <param name="shoppingCartService">Shopping cart service</param>
 /// <param name="checkoutAttributeFormatter">Checkout attribute service</param>
 /// <param name="shippingService">Shipping service</param>
 /// <param name="shipmentService">Shipment service</param>
 /// <param name="taxService">Tax service</param>
 /// <param name="customerService">Customer service</param>
 /// <param name="discountService">Discount service</param>
 /// <param name="encryptionService">Encryption service</param>
 /// <param name="workContext">Work context</param>
 /// <param name="workflowMessageService">Workflow message service</param>
 /// <param name="vendorService">Vendor service</param>
 /// <param name="customerActivityService">Customer activity service</param>
 /// <param name="currencyService">Currency service</param>
 /// <param name="affiliateService">Affiliate service</param>
 /// <param name="eventPublisher">Event published</param>
 /// <param name="pdfService">PDF service</param>
 /// <param name="paymentSettings">Payment settings</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="orderSettings">Order settings</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="currencySettings">Currency settings</param>
 public OrderProcessingService(IOrderService orderService,
     IWebHelper webHelper,
     ILocalizationService localizationService,
     ILanguageService languageService,
     IProductService productService,
     IPaymentService paymentService,
     ILogger logger,
     IOrderTotalCalculationService orderTotalCalculationService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     IProductAttributeParser productAttributeParser,
     IProductAttributeFormatter productAttributeFormatter,
     IGiftCardService giftCardService,
     IShoppingCartService shoppingCartService,
     ICheckoutAttributeFormatter checkoutAttributeFormatter,
     IShippingService shippingService,
     IShipmentService shipmentService,
     ITaxService taxService,
     ICustomerService customerService,
     IDiscountService discountService,
     IEncryptionService encryptionService,
     IWorkContext workContext,
     IWorkflowMessageService workflowMessageService,
     IVendorService vendorService,
     ICustomerActivityService customerActivityService,
     ICurrencyService currencyService,
     IAffiliateService affiliateService,
     IEventPublisher eventPublisher,
     IPdfService pdfService,
     ShippingSettings shippingSettings,
     PaymentSettings paymentSettings,
     RewardPointsSettings rewardPointsSettings,
     OrderSettings orderSettings,
     TaxSettings taxSettings,
     LocalizationSettings localizationSettings,
     CurrencySettings currencySettings,
     IGenericAttributeService genericAttributeService,
     PromoSettings promoSettings,
     IPromoUtilities promoUtilities,
     IPromoOrderService promoOrderService,
     IPromoService promoService,
     IStoreContext storeContext)
     : base(orderService, webHelper, localizationService, languageService, productService, paymentService,
                                                 logger, orderTotalCalculationService, priceCalculationService, priceFormatter, productAttributeParser,
                                                 productAttributeFormatter, giftCardService, shoppingCartService, checkoutAttributeFormatter, shippingService,
                                                 shipmentService, taxService, customerService, discountService, encryptionService, workContext, workflowMessageService,
                                                 vendorService, customerActivityService, currencyService, affiliateService, eventPublisher, pdfService,
                                                 shippingSettings, paymentSettings, rewardPointsSettings, orderSettings, taxSettings,
                                                 localizationSettings, currencySettings)
 {
     this._orderService = orderService;
     this._webHelper = webHelper;
     this._localizationService = localizationService;
     this._languageService = languageService;
     this._productService = productService;
     this._paymentService = paymentService;
     this._logger = logger;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._priceCalculationService = priceCalculationService;
     this._priceFormatter = priceFormatter;
     this._productAttributeParser = productAttributeParser;
     this._productAttributeFormatter = productAttributeFormatter;
     this._giftCardService = giftCardService;
     this._shoppingCartService = shoppingCartService;
     this._checkoutAttributeFormatter = checkoutAttributeFormatter;
     this._workContext = workContext;
     this._workflowMessageService = workflowMessageService;
     this._vendorService = vendorService;
     this._shippingService = shippingService;
     this._shipmentService = shipmentService;
     this._taxService = taxService;
     this._customerService = customerService;
     this._discountService = discountService;
     this._encryptionService = encryptionService;
     this._customerActivityService = customerActivityService;
     this._currencyService = currencyService;
     this._affiliateService = affiliateService;
     this._eventPublisher = eventPublisher;
     this._pdfService = pdfService;
     this._paymentSettings = paymentSettings;
     this._shippingSettings = shippingSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._orderSettings = orderSettings;
     this._taxSettings = taxSettings;
     this._localizationSettings = localizationSettings;
     this._currencySettings = currencySettings;
     this._genericAttributeService = genericAttributeService;
     this._promoSettings = promoSettings;
     this._promoUtilities = promoUtilities;
     this._promoOrderService = promoOrderService;
     this._promoService = promoService;
     this._storeContext = storeContext;
 }
Exemple #47
0
 public static string GetDialog(string dialogKey)
 {
     lSettings = Resources.Load<LocalizationSettings> ("Languages/Settings");
     return lSettings.GetDialog(dialogKey);
 }
Exemple #48
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, IMobileDeviceHelper mobileDeviceHelper,
            HttpContextBase httpContext, ICacheManager cacheManager,
            ICustomerActivityService customerActivityService, CustomerSettings customerSettings, 
            TaxSettings taxSettings, CatalogSettings catalogSettings,
            StoreInformationSettings storeInformationSettings, EmailAccountSettings emailAccountSettings,
            CommonSettings commonSettings, BlogSettings blogSettings, 
            NewsSettings newsSettings, 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._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._mobileDeviceHelper = mobileDeviceHelper;
            this._httpContext = httpContext;
            this._cacheManager = cacheManager;
            this._customerActivityService = customerActivityService;

            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;
        }
        public new void SetUp()
        {
            _workContext = null;
            _storeContext = null;

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

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

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

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

            _localizationService = MockRepository.GenerateMock<ILocalizationService>();

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

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

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

            _rewardPointsSettings = new RewardPointsSettings();

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

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

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

            _localizationSettings = new LocalizationSettings();

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

            _currencySettings = new CurrencySettings();

            _orderProcessingService = new OrderProcessingService(_orderService, _webHelper,
                _localizationService, _languageService,
                _productService, _paymentService, _logger,
                _orderTotalCalcService, _priceCalcService, _priceFormatter,
                _productAttributeParser, _productAttributeFormatter,
                _giftCardService, _shoppingCartService, _checkoutAttributeFormatter,
                _shippingService, _shipmentService, _taxService,
                _customerService, _discountService,
                _encryptionService, _workContext,
                _workflowMessageService, _vendorService,
                _customerActivityService, _currencyService, _affiliateService,
                _eventPublisher, _paymentSettings, _rewardPointsSettings,
                _orderSettings, _taxSettings, _localizationSettings,
                _currencySettings);
        }
Exemple #50
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="productRepository">Product repository</param>
 /// <param name="productVariantRepository">Product variant repository</param>
 /// <param name="relatedProductRepository">Related product repository</param>
 /// <param name="crossSellProductRepository">Cross-sell product repository</param>
 /// <param name="tierPriceRepository">Tier price repository</param>
 /// <param name="localizedPropertyRepository">Localized property repository</param>
 /// <param name="aclRepository">ACL record repository</param>
 /// <param name="storeMappingRepository">Store mapping repository</param>
 /// <param name="productPictureRepository">Product picture repository</param>
 /// <param name="productSpecificationAttributeRepository">Product specification attribute repository</param>
 /// <param name="productReviewRepository">Product review repository</param>
 /// <param name="productAttributeService">Product attribute service</param>
 /// <param name="productAttributeParser">Product attribute parser service</param>
 /// <param name="languageService">Language service</param>
 /// <param name="workflowMessageService">Workflow message service</param>
 /// <param name="dataProvider">Data provider</param>
 /// <param name="dbContext">Database Context</param>
 /// <param name="workContext">Work context</param>
 /// <param name="storeContext">Store context</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="commonSettings">Common settings</param>
 /// <param name="eventPublisher">Event published</param>
 public ProductService(ICacheManager cacheManager,
     IRepository<Product> productRepository,
     IRepository<ProductVariant> productVariantRepository,
     IRepository<RelatedProduct> relatedProductRepository,
     IRepository<CrossSellProduct> crossSellProductRepository,
     IRepository<TierPrice> tierPriceRepository,
     IRepository<ProductPicture> productPictureRepository,
     IRepository<LocalizedProperty> localizedPropertyRepository,
     IRepository<AclRecord> aclRepository,
     IRepository<StoreMapping> storeMappingRepository,
     IRepository<ProductSpecificationAttribute> productSpecificationAttributeRepository,
     IRepository<ProductReview>  productReviewRepository,
     IProductAttributeService productAttributeService,
     IProductAttributeParser productAttributeParser,
     ILanguageService languageService,
     IWorkflowMessageService workflowMessageService,
     IDataProvider dataProvider, IDbContext dbContext,
     IWorkContext workContext, IStoreContext storeContext,
     LocalizationSettings localizationSettings, CommonSettings commonSettings,
     IEventPublisher eventPublisher)
 {
     this._cacheManager = cacheManager;
     this._productRepository = productRepository;
     this._productVariantRepository = productVariantRepository;
     this._relatedProductRepository = relatedProductRepository;
     this._crossSellProductRepository = crossSellProductRepository;
     this._tierPriceRepository = tierPriceRepository;
     this._productPictureRepository = productPictureRepository;
     this._localizedPropertyRepository = localizedPropertyRepository;
     this._aclRepository = aclRepository;
     this._storeMappingRepository = storeMappingRepository;
     this._productSpecificationAttributeRepository = productSpecificationAttributeRepository;
     this._productReviewRepository = productReviewRepository;
     this._productAttributeService = productAttributeService;
     this._productAttributeParser = productAttributeParser;
     this._languageService = languageService;
     this._workflowMessageService = workflowMessageService;
     this._dataProvider = dataProvider;
     this._dbContext = dbContext;
     this._workContext = workContext;
     this._storeContext= storeContext;
     this._localizationSettings = localizationSettings;
     this._commonSettings = commonSettings;
     this._eventPublisher = eventPublisher;
 }
    void SaveSettingsFile()
    {
        if (settings == null)
        {
            settings = (LocalizationSettings)ScriptableObject.CreateInstance(typeof(LocalizationSettings));
            string settingsPath = Path.GetDirectoryName(settingsAssetPath);
            if (!Directory.Exists(settingsPath))
            {
                Directory.CreateDirectory(settingsPath);
                AssetDatabase.ImportAsset(settingsPath);
            }

            AssetDatabase.CreateAsset(settings, settingsAssetPath);
        }
        settings.defaultLangCode = langCode.ToString();
        settings.useSystemLanguagePerDefault = useSystemLang;
        EditorUtility.SetDirty(settings);

    }
		protected override void OnInspectorGUI(LocalizationSettings settings, LocalizationServiceItem item, System.Action onReset, GUISkin skin) {

			//var data = FlowSystem.GetData();

			if (settings == null) return;

			GUILayout.Label("URL:");
			var newKey = GUILayout.TextArea(settings.url);
			if (newKey != settings.url) {

				settings.url = newKey;
				UnityEditor.EditorUtility.SetDirty(settings);

			}

			UnityEditor.EditorGUI.BeginDisabledGroup(item.processing);
			if (GUILayout.Button(item.processing == true ? "Loading..." : "Load", skin.button) == true) {

				if (item.processing == false) {
					
					item.processing = true;
					
					// Connecting
					this.OnEditorAuth(item.authKey, (result) => {

						//UnityEditor.EditorApplication.delayCall += () => {

							this.StartCoroutine(this.GetData(settings.url, (res) => {
								
								if (res.hasError == false) {

									LocalizationSystem.TryToSaveCSV(res.data);

								}

								item.processing = false;

							}));

						//};
						
					});

				}

			}
			UnityEditor.EditorGUI.EndDisabledGroup();

		}