public void SaveSettings()
{
if (!m_persistSettings)
return;
// Ensure that settings category is specified.
if (string.IsNullOrEmpty(m_settingsCategory))
throw new ConfigurationErrorsException("SettingsCategory property has not been set");
// Save settings under the specified category.
ConfigurationFile config = ConfigurationFile.Current;
CategorizedSettingsElementCollection settings = config.Settings[m_settingsCategory];
settings["LogStatusUpdates", true].Update(m_logStatusUpdates);
settings["MaxStatusUpdatesLength", true].Update(m_maxStatusUpdatesLength);
settings["MaxStatusUpdatesFrequency", true].Update(m_maxStatusUpdatesFrequency);
settings["MonitorServiceHealth", true].Update(m_monitorServiceHealth);
settings["HealthMonitorInterval", true].Update(m_healthMonitorInterval);
settings["RequestHistoryLimit", true].Update(m_requestHistoryLimit);
settings["SupportFileManagementCommands", true].Update(m_supportFileManagementCommands);
settings["SupportTelnetSessions", true].Update(m_supportTelnetSessions);
settings["SupportSystemCommands", true].Update(m_supportSystemCommands);
settings["SecureRemoteInteractions", true].Update(m_secureRemoteInteractions);
settings["SerializationFormat", true].Update(m_serializationFormat);
config.Save();
}