Update BasePlugin.cs

Added ConfigurationChanged event.
This commit is contained in:
BaronGreenback 2020-10-11 16:41:30 +01:00 committed by GitHub
parent 0b73a1d90f
commit 8c0748b677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,6 +175,11 @@ namespace MediaBrowser.Common.Plugins
/// <value>The type of the configuration.</value>
public Type ConfigurationType => typeof(TConfigurationType);
/// <summary>
/// Gets or sets the event handler that is triggered when this configuration changes.
/// </summary>
public EventHandler<BasePluginConfiguration> ConfigurationChanged { get; set; }
/// <summary>
/// Gets the name the assembly file.
/// </summary>
@ -270,6 +275,8 @@ namespace MediaBrowser.Common.Plugins
Configuration = (TConfigurationType)configuration;
SaveConfiguration();
ConfigurationChanged.Invoke(this, configuration);
}
/// <inheritdoc />