コード例 #1
0
        internal static DefaultSettingsSection GetSection()
        {
            DefaultSettingsSection section = (DefaultSettingsSection)System.Configuration.PrivilegedConfigurationManager.GetSection(ConfigurationStrings.DefaultSettingsSectionPath);

            if (section == null)
            {
                throw new ConfigurationErrorsException(string.Format(CultureInfo.CurrentCulture, System.Transactions.SR.GetString("ConfigurationSectionNotFound"), new object[] { ConfigurationStrings.DefaultSettingsSectionPath }));
            }
            return(section);
        }
コード例 #2
0
        static internal DefaultSettingsSection GetSection()
        {
            DefaultSettingsSection retval = (DefaultSettingsSection)PrivilegedConfigurationManager.GetSection(ConfigurationStrings.DefaultSettingsSectionPath);

            if (retval == null)
            {
                throw new ConfigurationErrorsException(string.Format(CultureInfo.CurrentCulture,
                                                                     SR.GetString(SR.ConfigurationSectionNotFound),
                                                                     ConfigurationStrings.DefaultSettingsSectionPath));
            }
            return(retval);
        }