System.Configuration.PrivilegedConfigurationManager.GetSection C# (CSharp) Метод

GetSection() статический приватный Метод

static private GetSection ( string sectionName ) : object
sectionName string
Результат object
        internal static object GetSection(string sectionName) {
            return ConfigurationManager.GetSection(sectionName);
        }
    }

Usage Example

        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////
#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;
            }
        }
All Usage Examples Of System.Configuration.PrivilegedConfigurationManager::GetSection
PrivilegedConfigurationManager