Inheritance: System.Configuration.Provider.ProviderCollection
        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////
#if CACHE_PROVIDERS_IN_STATIC
        private static void InstantiateProviders()
        {
            if (_Providers != null)
            {
                return;
            }

            lock (_Lock)
            {
                if (_Providers != null)
                {
                    return;
                }

                ProtectedConfigurationProviderCollection providers = new ProtectedConfigurationProviderCollection();
                ProtectedConfigurationSection            config    = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection;

                if (config != null)
                {
                    foreach (DictionaryEntry de in config.ProviderNodes)
                    {
                        ProviderNode pn = de.Value as ProviderNode;

                        if (pn == null)
                        {
                            continue;
                        }

                        providers.Add(pn.Provider);
                    }
                }

                _Providers = providers;
            }
        }
        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////
        private static void InstantiateProviders()
        {
            if (_Providers != null)
                return;

            lock (_Lock)
            {
                if (_Providers != null)
                    return;

                ProtectedConfigurationProviderCollection providers = new ProtectedConfigurationProviderCollection();
                ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection;

                if (config != null)
                {
                    foreach (DictionaryEntry de in config.ProviderNodes)
                    {
                        ProviderNode pn = de.Value as ProviderNode;

                        if (pn == null)
                            continue;

                        providers.Add(pn.Provider);
                    }
                }

                _Providers = providers;
            }
        }
 internal ProtectedConfigurationProviderCollection GetAllProviders()
 {
     ProtectedConfigurationProviderCollection coll = new ProtectedConfigurationProviderCollection();
     foreach (ProviderSettings ps in Providers)
         coll.Add(InstantiateProvider(ps));
     return coll;
 }
 internal ProtectedConfigurationProviderCollection GetAllProviders()
 {
     ProtectedConfigurationProviderCollection providers = new ProtectedConfigurationProviderCollection();
     foreach (ProviderSettings settings in this.Providers)
     {
         providers.Add(this.InstantiateProvider(settings));
     }
     return providers;
 }
        internal ProtectedConfigurationProviderCollection GetAllProviders()
        {
            ProtectedConfigurationProviderCollection coll = new ProtectedConfigurationProviderCollection();

            foreach (ProviderSettings ps in Providers)
            {
                coll.Add(InstantiateProvider(ps));
            }
            return(coll);
        }
Esempio n. 6
0
        internal ProtectedConfigurationProviderCollection GetAllProviders()
        {
            ProtectedConfigurationProviderCollection providers = new ProtectedConfigurationProviderCollection();

            foreach (ProviderSettings settings in this.Providers)
            {
                providers.Add(this.InstantiateProvider(settings));
            }
            return(providers);
        }
        internal ProtectedConfigurationProviderCollection GetAllProviders()
        {
            if (providers == null)
            {
                providers = new ProtectedConfigurationProviderCollection();

                foreach (ProviderSettings ps in Providers)
                {
                    providers.Add(InstantiateProvider(ps));
                }
            }

            return(providers);
        }
		internal ProtectedConfigurationProviderCollection GetAllProviders ()
		{
			if (providers == null) {
				providers = new ProtectedConfigurationProviderCollection ();

				foreach (ProviderSettings ps in Providers) {
					providers.Add (InstantiateProvider (ps));
				}
			}

			return providers;
		}