/// <summary> /// Copies configuration values from the specified configuration if the /// specified config contains matching settings. /// </summary> /// <param name="config"> /// The configuration to copy values from. /// </param> /// <exception cref="ObjectDisposedException"> /// This instance hass been disposed. /// </exception> public void CopyFromConfig(PluginConfiguration config) { if (this._isDisposed) { throw new ObjectDisposedException("PluginConfiguration"); } if ((!config.IsDisposed) && (!config.IsEmpty)) { foreach (var key in config.AllKeys) { if (this._backingStore.ContainsKey(key)) { this.SetValue(key, config.GetValue(key)); } else { this.AddConfigurationSetting(key, config.GetValue(key)); } } } }
/// <summary> /// In a derived class, saves the plugin's configuration. /// </summary> /// <param name="config"> /// The plugin configuration to save to the plugin's configuration file. /// </param> public abstract void SaveConfiguration(PluginConfiguration config);