private static void Initialize() { MCProviderConfiguration configuration = (MCProviderConfiguration)ConfigurationManager.GetSection("MCProvider"); if (configuration == null) throw new ConfigurationErrorsException("MCProvider section is missing"); providers = new MCProviderCollection(); ProvidersHelper.InstantiateProviders(configuration.Providers, providers, typeof(MCProvider)); providers.SetReadOnly(); defaultProvider = providers[configuration.Default]; if (defaultProvider == null) throw new Exception("defaultProvider"); }
private static void Initialize() { MCProviderConfiguration configuration = (MCProviderConfiguration)ConfigurationManager.GetSection("MCProvider"); if (configuration == null) { throw new ConfigurationErrorsException("MCProvider section is missing"); } providers = new MCProviderCollection(); ProvidersHelper.InstantiateProviders(configuration.Providers, providers, typeof(MCProvider)); providers.SetReadOnly(); defaultProvider = providers[configuration.Default]; if (defaultProvider == null) { throw new Exception("defaultProvider"); } }