public static void WriteConfiguration(AppConfigBase configBase)
{
try
{
if (configBase.GetType() == typeof(AppConfigBase))
{
string strErrMessage = "The function WriteConfiguration could not be used for the type AppConfigBase";
Debug.Assert(false, strErrMessage);
throw new Exception(strErrMessage);
}
string strAppDataFile = GetConfigurationFile(configBase, true);
if (strAppDataFile == String.Empty)
{
return;
}
XmlSerializer serializer = new XmlSerializer(configBase.GetType());
using (TextWriter writer = new StreamWriter(strAppDataFile))
{
serializer.Serialize(writer, configBase);
}
}
catch (Exception exp)
{
Logger.ThrowException(exp, "a485d266-6a6c-46a8-a546-e424956e09e3");
}
}