GetSection() public static method

public static GetSection ( string sectionName ) : object
sectionName string
return object
            internal ApplicationSettings()
            {
#pragma warning disable 0436
                ScriptingJsonSerializationSection section = (ScriptingJsonSerializationSection)
                                                            WebConfigurationManager.GetSection("system.web.extensions/scripting/webServices/jsonSerialization");
#pragma warning restore 0436

                if (section != null)
                {
                    _recusionLimit = section.RecursionLimit;
                    _maxJsonLimit  = section.MaxJsonLength;
                    _converters    = section.Converters.CreateConverters();
                }
                else
                {
                    _recusionLimit = (int)_propRecursionLimitLimit.DefaultValue;
                    _maxJsonLimit  = (int)_propMaxJsonLength.DefaultValue;
                    _converters    = new JavaScriptConverter[0];
                }
            }
Esempio n. 2
0
 object IInternalConfigSystem.GetSection(string configKey)
 {
     return(WebConfigurationManager.GetSection(configKey));
 }