Example #1
0
        /// <inheritdoc/>
        public SettingManager(ISettingDefinitionManager settingDefinitionManager, IThreadSafeCacheFactoryService threadSafeCacheFactory)
        {
            _settingDefinitionManager = settingDefinitionManager;

            Session      = NullAbpSession.Instance;
            SettingStore = NullSettingStore.Instance; //Should be constructor injection? For that, ISettingStore must be registered!

            _applicationSettings = new Lazy <Dictionary <string, SettingInfo> >(GetApplicationSettingsFromDatabase, true);
            _tenantSettingCache  = threadSafeCacheFactory.CreateThreadSafeObjectCache <Dictionary <string, SettingInfo> >(GetType().FullName + ".TenantSettings", TimeSpan.FromMinutes(60)); //TODO: Get constant from somewhere else.
            _userSettingCache    = threadSafeCacheFactory.CreateThreadSafeObjectCache <Dictionary <string, SettingInfo> >(GetType().FullName + ".UserSettings", TimeSpan.FromMinutes(20));   //TODO: Get constant from somewhere else.
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Abp.Web.Localization.LocalizationScriptManager"/> class.
 /// </summary>
 /// <param name="localizationManager">Localization manager.</param>
 public LocalizationScriptManager(ILocalizationManager localizationManager, IThreadSafeCacheFactoryService threadSafeCacheFactory)
 {
     _localizationManager = localizationManager;
     _cache = threadSafeCacheFactory.CreateThreadSafeObjectCache <string>("__LocalizationScriptManager", TimeSpan.FromDays(1));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="Abp.Web.Localization.LocalizationScriptManager"/> class.
 /// </summary>
 /// <param name="localizationManager">Localization manager.</param>
 public LocalizationScriptManager(ILocalizationManager localizationManager, IThreadSafeCacheFactoryService threadSafeCacheFactory)
 {
     _localizationManager = localizationManager;
     _cache = threadSafeCacheFactory.CreateThreadSafeObjectCache<string>("__LocalizationScriptManager", TimeSpan.FromDays(1));
 }