Esempio n. 1
0
        static ForumManager()
        {
            //Get the feature's configuration info
            ForumProviderConfiguration qc =
                (ForumProviderConfiguration)ConfigurationManager.GetSection("forumManager");

            if (qc == null || qc.DefaultProvider == null || qc.Providers == null || qc.Providers.Count < 1)
                throw new ProviderException("You must specify a valid default provider for forumManager.");

            //Instantiate the providers
            providerCollection = new ForumProviderCollection();
            ProvidersHelper.InstantiateProviders(qc.Providers, providerCollection, typeof(ForumProvider));
            providerCollection.SetReadOnly();
            defaultProvider = providerCollection[qc.DefaultProvider];
            if (defaultProvider == null)
            {
                throw new ConfigurationErrorsException(
                    "You must specify a default provider for the forumManager.",
                    qc.ElementInformation.Properties["defaultProvider"].Source,
                    qc.ElementInformation.Properties["defaultProvider"].LineNumber);
            }
        }
 public void CopyTo(ForumProvider[] array, int index)
 {
     base.CopyTo(array, index);
 }