示例#1
0
        internal static LocalizationSettings ReadLocalizationSettings()
        {
            try
            {
                if (currentSettings == null)
                {
                    lock (sync)
                    {
                        //Configuration config = WebConfigurationManager.OpenWebConfiguration("/", SPContext.Current.Site.WebApplication.Name);
                        currentSettings = ConfigurationManager.GetSection(localizationSettingsSectionName) as LocalizationSettings;
                        //currentSettings = config.GetSection(localizationSettingsSectionName) as LocalizationSettings;
                    }
                }
                return(currentSettings);
            }
            catch (Exception)
            {
                //nothing configured

                //Do not log this exception

                return(null);
            }
        }
示例#2
0
        internal static LocalizationSettings ReadLocalizationSettings()
        {

            try
            {
                if (currentSettings == null)
                    lock (sync)
                    {
                        //Configuration config = WebConfigurationManager.OpenWebConfiguration("/", SPContext.Current.Site.WebApplication.Name);
                        currentSettings = ConfigurationManager.GetSection(localizationSettingsSectionName) as LocalizationSettings;
                        //currentSettings = config.GetSection(localizationSettingsSectionName) as LocalizationSettings;
                    }
                return currentSettings;
            }
            catch (Exception)
            {
                //nothing configured

                //Do not log this exception
                
                return null;
                
            }
        }