//*************************************************************************** // Private Methods // private static void Initialize() { DatabaseStreamProviderConfiguration config = (DatabaseStreamProviderConfiguration)ConfigurationManager.GetSection("DatabaseImageProvider"); if (config == null) { throw new ConfigurationErrorsException("Database image provider configuration section not set correctly."); } _providers = new DatabaseStreamProviderCollection(); System.Web.Configuration.ProvidersHelper.InstantiateProviders(config.Providers, _providers, typeof(DatabaseStreamProvider)); _providers.SetReadOnly(); _defaultProvider = _providers[config.Default]; if (_defaultProvider == null) { throw new ProviderException("No default provider specified."); } }
//*************************************************************************** // Private Methods // private static void Initialize() { DatabaseStreamProviderConfiguration config = (DatabaseStreamProviderConfiguration)ConfigurationManager.GetSection("DatabaseImageProvider"); if (config == null) throw new ConfigurationErrorsException("Database image provider configuration section not set correctly."); _providers = new DatabaseStreamProviderCollection(); System.Web.Configuration.ProvidersHelper.InstantiateProviders(config.Providers, _providers, typeof(DatabaseStreamProvider)); _providers.SetReadOnly(); _defaultProvider = _providers[config.Default]; if (_defaultProvider == null) throw new ProviderException("No default provider specified."); }