System.Net.Configuration.RequestCachingSectionInternal.GetSection C# (CSharp) Method

GetSection() static private method

static private GetSection ( ) : RequestCachingSectionInternal
return RequestCachingSectionInternal
        static internal RequestCachingSectionInternal GetSection()
        {
            lock (RequestCachingSectionInternal.ClassSyncObject)
            {
                RequestCachingSection section = PrivilegedConfigurationManager.GetSection(ConfigurationStrings.RequestCachingSectionPath) as RequestCachingSection;
                if (section == null)
                    return null;

                try
                {
                    return new RequestCachingSectionInternal(section);
                }
                catch (Exception exception)
                {
                    if (NclUtilities.IsFatal(exception)) throw;

                    throw new ConfigurationErrorsException(SR.GetString(SR.net_config_requestcaching), exception);
                }
                catch
                {
                    throw new ConfigurationErrorsException(SR.GetString(SR.net_config_requestcaching), new Exception(SR.GetString(SR.net_nonClsCompliantException)));
                }
            }
        }
RequestCachingSectionInternal