using System;
using System.Collections.Generic;
namespace MediaBrowser.Common.Configuration
{
///
/// 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.
///
public interface IConfigurationFactory
{
///
/// Get the configuration store for this module.
///
/// The configuration store.
IEnumerable GetConfigurations();
}
///
/// Describes a single entry in the application configuration.
///
public class ConfigurationStore
{
///
/// Gets or sets the unique identifier for the configuration.
///
public string Key { get; set; }
///
/// Gets or sets the type used to store the data for this configuration entry.
///
public Type ConfigurationType { get; set; }
}
///
/// A configuration store that can be validated.
///
public interface IValidatingConfiguration
{
///
/// Validation method to be invoked before saving the configuration.
///
/// The old configuration.
/// The new configuration.
void Validate(object oldConfig, object newConfig);
}
}