protected override GlobalSettingsProviderData GetConfiguration(string name, IConfigurationSource configurationSource)
        {
            GlobalSettingsProviderSettings settings = configurationSource.GetSection(GlobalSettingsProviderSettings.SectionName) as GlobalSettingsProviderSettings;

            if (null == settings)
            {
                throw new ConfigurationErrorsException(string.Format("The configuration section '{0}' was not found in the configuration", GlobalSettingsProviderSettings.SectionName));
            }

            return(settings.GlobalSettingsProviderPlugins.Get(name));
        }
        public string MapName(string name, IConfigurationSource configSource)
        {
            if (null == configSource)
            {
                throw new ArgumentNullException("configSource");
            }

            if (null != name)
            {
                return(name);
            }
            else
            {
                GlobalSettingsProviderSettings settings = configSource.GetSection(GlobalSettingsProviderSettings.SectionName) as GlobalSettingsProviderSettings;

                if (null == settings)
                {
                    throw new ConfigurationErrorsException(string.Format("Could not load configuration section {0}", GlobalSettingsProviderSettings.SectionName));
                }

                return(settings.DefaultGlobalSettingsProvider);
            }
        }