Example #1
0
        public void SaveConfiguration()
        {
            ConfigurationUpdatedEventArgs eventArgs = new ConfigurationUpdatedEventArgs();

            OnConfigurationUpdated(eventArgs);
            Save();
        }
Example #2
0
 public void ConfigurationUpdatedHandler(object sender, ConfigurationUpdatedEventArgs e)
 {
     try
     {
         UpdateHook();
         e.Success = true;
     }
     catch (Exception exc)
     {
         e.Success      = false;
         e.ErrorMessage = exc.Message;
     }
 }
Example #3
0
        protected virtual void OnConfigurationUpdated(ConfigurationUpdatedEventArgs e)
        {
            EventHandler <ConfigurationUpdatedEventArgs> handler = ConfigurationUpdatedHandler;

            if (handler != null)
            {
                handler(this, e);
                if (!e.Success)
                {
                    throw new InvalidOperationException(e.ErrorMessage);
                }
            }
        }