/// <summary>
 /// Copies to this collection to an array.
 /// </summary>
 /// <param name="array">The array.</param>
 /// <param name="index">The index.</param>
 public void CopyTo(WaxDataProviderBase[] array, int index)
 {
     base.CopyTo(array, index);
 }
        private static WaxDataProviderCollection InitializeProviderCollection()
        {
            try
            {
                //Get the feature's configuration info
                WaxDataProviderConfiguration qc =
                    (WaxDataProviderConfiguration)ConfigurationManager.GetSection("Wax.Data.Configuration");

                if (qc == null)
                    throw new ConfigurationErrorsException("No Wax.Data.Configuration found in your configuration file.");

                if (qc.Providers == null)
                    throw new ConfigurationErrorsException("No Wax.Data.Configuration found in your configuration file.");

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

                //Instantiate the providers
                providerCollection = new WaxDataProviderCollection();
                ProvidersHelper.InstantiateProviders(qc.Providers, providerCollection, typeof(WaxDataProviderBase));

                providerCollection.SetReadOnly();
                defaultProvider = providerCollection[qc.DefaultProvider];
                if (defaultProvider == null)
                {
                    throw new ConfigurationErrorsException(
                        "You must specify a default provider for the feature.",
                        qc.ElementInformation.Properties["defaultProvider"].Source,
                        qc.ElementInformation.Properties["defaultProvider"].LineNumber);
                }
            }
            catch
            {
                throw;
            }
            return providerCollection;
        }