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

HandleTrace() private static method

private static HandleTrace ( Hashtable config, XmlNode traceNode, object context ) : void
config System.Collections.Hashtable
traceNode System.Xml.XmlNode
context object
return void
        private static void HandleTrace(Hashtable config, XmlNode traceNode, object context) {
            bool foundListeners = false;
            bool autoflush = false;
            if (HandlerBase.GetAndRemoveBooleanAttribute(traceNode, "autoflush", ref autoflush) != null)
                config["autoflush"] = autoflush;
                                       
            int indentsize = 0;
            if (HandlerBase.GetAndRemoveIntegerAttribute(traceNode, "indentsize", ref indentsize) != null)
                config["indentsize"] = indentsize;

            foreach (XmlNode traceChild in traceNode.ChildNodes) {
                if (HandlerBase.IsIgnorableAlsoCheckForNonElement(traceChild))
                    continue;
                
                if (traceChild.Name == "listeners") {
                    if (foundListeners) 
                        throw new ConfigurationErrorsException(SR.GetString(SR.ConfigSectionsUnique, "listeners"));
                    foundListeners = true;

                    HandleListeners(config, traceChild, context);
                }
                else {
                    HandlerBase.ThrowUnrecognizedElement(traceChild);
                }
            }
        }