public void Save (ConfigurationSaveMode mode, bool forceUpdateAll)
{
ConfigurationSaveEventHandler saveStart = SaveStart;
ConfigurationSaveEventHandler saveEnd = SaveEnd;
object ctx = null;
Exception saveEx = null;
Stream stream = system.Host.OpenStreamForWrite (streamName, null, ref ctx);
try {
if (saveStart != null)
saveStart (this, new ConfigurationSaveEventArgs (streamName, true, null, ctx));
Save (stream, mode, forceUpdateAll);
system.Host.WriteCompleted (streamName, true, ctx);
} catch (Exception ex) {
saveEx = ex;
system.Host.WriteCompleted (streamName, false, ctx);
throw;
} finally {
stream.Close ();
if (saveEnd != null)
saveEnd (this, new ConfigurationSaveEventArgs (streamName, false, saveEx, ctx));
}
}