internal static MachineSettingsSection GetSection() { MachineSettingsSection section = (MachineSettingsSection)System.Configuration.PrivilegedConfigurationManager.GetSection(ConfigurationStrings.MachineSettingsSectionPath); if (section == null) { throw new ConfigurationErrorsException(string.Format(CultureInfo.CurrentCulture, System.Transactions.SR.GetString("ConfigurationSectionNotFound"), new object[] { ConfigurationStrings.MachineSettingsSectionPath })); } return(section); }
// System.Transactions reads the Configuration information in a non destructive way. static internal MachineSettingsSection GetSection() { MachineSettingsSection retval = (MachineSettingsSection)PrivilegedConfigurationManager.GetSection(ConfigurationStrings.MachineSettingsSectionPath); if (retval == null) { throw new ConfigurationErrorsException(string.Format(CultureInfo.CurrentCulture, SR.GetString(SR.ConfigurationSectionNotFound), ConfigurationStrings.MachineSettingsSectionPath)); } return(retval); }