Пример #1
0
        private static void Initialize()
        {
            FileSystemConfiguration config = FileSystemConfiguration.GetConfig();

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

                providerCollection = new FileSystemProviderCollection();

                ProvidersHelper.InstantiateProviders(
                    config.Providers,
                    providerCollection,
                    typeof(FileSystemProvider));

                providerCollection.SetReadOnly();
                defaultProvider = providerCollection[config.DefaultProvider];
        }
Пример #2
0
        private static void Initialize()
        {
            FileSystemConfiguration config = FileSystemConfiguration.GetConfig();

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


            providerCollection = new FileSystemProviderCollection();

            ProvidersHelper.InstantiateProviders(
                config.Providers,
                providerCollection,
                typeof(FileSystemProvider));

            providerCollection.SetReadOnly();
            defaultProvider = providerCollection[config.DefaultProvider];
        }