#pragma warning disable CS1591
using System;
using System.Collections.Generic;
using MediaBrowser.Model.Configuration;
namespace MediaBrowser.Common.Configuration
{
    public interface IConfigurationManager
    {
        /// 
        /// Occurs when [configuration updating].
        /// 
        event EventHandler NamedConfigurationUpdating;
        /// 
        /// Occurs when [configuration updated].
        /// 
        event EventHandler ConfigurationUpdated;
        /// 
        /// Occurs when [named configuration updated].
        /// 
        event EventHandler NamedConfigurationUpdated;
        /// 
        /// Gets the application paths.
        /// 
        /// The application paths.
        IApplicationPaths CommonApplicationPaths { get; }
        /// 
        /// Gets the configuration.
        /// 
        /// The configuration.
        BaseApplicationConfiguration CommonConfiguration { get; }
        /// 
        /// Saves the configuration.
        /// 
        void SaveConfiguration();
        /// 
        /// Replaces the configuration.
        /// 
        /// The new configuration.
        void ReplaceConfiguration(BaseApplicationConfiguration newConfiguration);
        /// 
        /// Manually pre-loads a factory so that it is available pre system initialisation.
        /// 
        /// Class to register.
        void RegisterConfiguration()
            where T : IConfigurationFactory;
        /// 
        /// Gets the configuration.
        /// 
        /// The key.
        /// System.Object.
        object GetConfiguration(string key);
        /// 
        /// Gets the array of configuration stores.
        /// 
        /// Array of ConfigurationStore.
        ConfigurationStore[] GetConfigurationStores();
        /// 
        /// Gets the type of the configuration.
        /// 
        /// The key.
        /// Type.
        Type GetConfigurationType(string key);
        /// 
        /// Saves the configuration.
        /// 
        /// The key.
        /// The configuration.
        void SaveConfiguration(string key, object configuration);
        /// 
        /// Adds the parts.
        /// 
        /// The factories.
        void AddParts(IEnumerable factories);
    }
    public static class ConfigurationManagerExtensions
    {
        public static T GetConfiguration(this IConfigurationManager manager, string key)
        {
            return (T)manager.GetConfiguration(key);
        }
    }
}