diff options
| author | artiume <siderite@gmail.com> | 2020-02-13 05:53:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-13 05:53:23 -0500 |
| commit | 40ad6f843fddab81bdaf26af4e6530ce4529eebf (patch) | |
| tree | 901eda2816373cc569ca0d3b1bca12418fb1f679 /MediaBrowser.Common/Configuration/IConfigurationFactory.cs | |
| parent | fd55164410f2cc630390e0694f8b962fce96aa61 (diff) | |
| parent | 64800de29da43aa74c2925d2a10b1f626b8c2eae (diff) | |
Merge pull request #16 from jellyfin/master
nightly
Diffstat (limited to 'MediaBrowser.Common/Configuration/IConfigurationFactory.cs')
| -rw-r--r-- | MediaBrowser.Common/Configuration/IConfigurationFactory.cs | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/MediaBrowser.Common/Configuration/IConfigurationFactory.cs b/MediaBrowser.Common/Configuration/IConfigurationFactory.cs index 9b4ed772d..07ca2b58b 100644 --- a/MediaBrowser.Common/Configuration/IConfigurationFactory.cs +++ b/MediaBrowser.Common/Configuration/IConfigurationFactory.cs @@ -1,25 +1,47 @@ -#pragma warning disable CS1591 -#pragma warning disable SA1600 - using System; using System.Collections.Generic; namespace MediaBrowser.Common.Configuration { + /// <summary> + /// Provides an interface to retrieve a configuration store. Classes with this interface are scanned for at + /// application start to dynamically register configuration for various modules/plugins. + /// </summary> public interface IConfigurationFactory { + /// <summary> + /// Get the configuration store for this module. + /// </summary> + /// <returns>The configuration store.</returns> IEnumerable<ConfigurationStore> GetConfigurations(); } + /// <summary> + /// Describes a single entry in the application configuration. + /// </summary> public class ConfigurationStore { + /// <summary> + /// Gets or sets the unique identifier for the configuration. + /// </summary> public string Key { get; set; } + /// <summary> + /// Gets or sets the type used to store the data for this configuration entry. + /// </summary> public Type ConfigurationType { get; set; } } + /// <summary> + /// A configuration store that can be validated. + /// </summary> public interface IValidatingConfiguration { + /// <summary> + /// Validation method to be invoked before saving the configuration. + /// </summary> + /// <param name="oldConfig">The old configuration.</param> + /// <param name="newConfig">The new configuration.</param> void Validate(object oldConfig, object newConfig); } } |
