//*************************************************************************** // Private Methods // private static void Initialize() { DynamicFormProviderConfiguration config = (DynamicFormProviderConfiguration)ConfigurationManager.GetSection("DynamicFormProvider"); if (config == null) { throw new ConfigurationErrorsException("Dynamic form provider configuration section is not set correctly."); } _providers = new DynamicFormProviderCollection(); System.Web.Configuration.ProvidersHelper.InstantiateProviders(config.Providers, _providers, typeof(DynamicFormProvider)); _providers.SetReadOnly(); _defaultProvider = _providers[config.Default]; if (_defaultProvider == null) { throw new ProviderException("No default dynamic form provider specified."); } }
//*************************************************************************** // Private Methods // private static void Initialize() { DynamicFormProviderConfiguration config = (DynamicFormProviderConfiguration)ConfigurationManager.GetSection("DynamicFormProvider"); if (config == null) throw new ConfigurationErrorsException("Dynamic form provider configuration section is not set correctly."); _providers = new DynamicFormProviderCollection(); System.Web.Configuration.ProvidersHelper.InstantiateProviders(config.Providers, _providers, typeof(DynamicFormProvider)); _providers.SetReadOnly(); _defaultProvider = _providers[config.Default]; if (_defaultProvider == null) throw new ProviderException("No default dynamic form provider specified."); }