public void SaveConfiguration() { ConfigurationUpdatedEventArgs eventArgs = new ConfigurationUpdatedEventArgs(); OnConfigurationUpdated(eventArgs); Save(); }
public void ConfigurationUpdatedHandler(object sender, ConfigurationUpdatedEventArgs e) { try { UpdateHook(); e.Success = true; } catch (Exception exc) { e.Success = false; e.ErrorMessage = exc.Message; } }
protected virtual void OnConfigurationUpdated(ConfigurationUpdatedEventArgs e) { EventHandler <ConfigurationUpdatedEventArgs> handler = ConfigurationUpdatedHandler; if (handler != null) { handler(this, e); if (!e.Success) { throw new InvalidOperationException(e.ErrorMessage); } } }