System.Diagnostics.DiagnosticsConfigurationHandler.HandleSwitches C# (CSharp) Method

HandleSwitches() private static method

private static HandleSwitches ( Hashtable config, XmlNode switchesNode, object context ) : void
config System.Collections.Hashtable
switchesNode System.Xml.XmlNode
context object
return void
        private static void HandleSwitches(Hashtable config, XmlNode switchesNode, object context) {
            Hashtable switches = (Hashtable) new SwitchesDictionarySectionHandler().Create(config["switches"], context, switchesNode);
            IDictionaryEnumerator en = switches.GetEnumerator();
            while (en.MoveNext()) {
                try {
                    Int32.Parse((string) en.Value, CultureInfo.InvariantCulture);
                }
                catch {
                    throw new ConfigurationErrorsException(SR.GetString(SR.Value_must_be_numeric, en.Key));
                }
            }

            config["switches"] = switches;
        }