private static void Initialize() { SectionConfig qc = (SectionConfig)ConfigurationManager.GetSection("GroupSection/General"); providerCollection = new ProviderList(); ProvidersHelper.InstantiateProviders(qc.Providers, providerCollection, typeof(GeneralProvider)); providerCollection.SetReadOnly(); isInitialized = true; //error-free initialization }
public static void Initialize() { if (!isInitialized) { SectionConfig qc = (SectionConfig)ConfigurationManager.GetSection("GroupSection/Organizations"); providerCollection = new ProviderList(); ProvidersHelper.InstantiateProviders(qc.Providers, providerCollection, typeof(OrganizationsProvider)); providerCollection.SetReadOnly(); isInitialized = true; //error-free initialization } }