internal void ProcessCaptureNode(System.Xml.XmlNode node, BrowserCapsElementType elementType)
        {
            string val  = null;
            string str2 = null;

            foreach (System.Xml.XmlNode node2 in node.ChildNodes)
            {
                if (node2.NodeType == XmlNodeType.Element)
                {
                    string name = node2.Name;
                    if (name == null)
                    {
                        goto Label_00F6;
                    }
                    if (!(name == "userAgent"))
                    {
                        if (name == "header")
                        {
                            goto Label_0094;
                        }
                        if (name == "capability")
                        {
                            goto Label_00C5;
                        }
                        goto Label_00F6;
                    }
                    System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "match", ref val);
                    this._captureHeaderChecks.Add(new CheckPair("User-Agent", val));
                }
                continue;
Label_0094:
                System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "name", ref str2);
                System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "match", ref val);
                this._captureHeaderChecks.Add(new CheckPair(str2, val));
                continue;
Label_00C5:
                System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "name", ref str2);
                System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "match", ref val);
                this._captureCapabilityChecks.Add(new CheckPair(str2, val));
                continue;
                Label_00F6 :;
                throw new ConfigurationErrorsException(System.Web.SR.GetString("Config_invalid_element", new object[] { node2.ToString() }), node2);
            }
        }
        internal void ProcessCaptureNode(XmlNode node, BrowserCapsElementType elementType)
        {
            string match  = null;
            string header = null;

            foreach (XmlNode child in node.ChildNodes)
            {
                if (child.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                switch (child.Name)
                {
                case "userAgent":
                    //match the user agent
                    HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "match", ref match);
                    _captureHeaderChecks.Add(new CheckPair("User-Agent", match));
                    break;

                case "header":
                    //match some arbitrary header
                    HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "name", ref header);
                    HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "match", ref match);
                    _captureHeaderChecks.Add(new CheckPair(header, match));
                    break;

                case "capability":
                    //match against an already set capability
                    HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "name", ref header);
                    HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "match", ref match);
                    _captureCapabilityChecks.Add(new CheckPair(header, match));
                    break;

                default:
                    throw new ConfigurationErrorsException(SR.GetString(SR.Config_invalid_element, child.ToString()), child);
                }
            }
            return;
        }
 internal void ProcessCaptureNode(XmlNode node, BrowserCapsElementType elementType) {
     string match = null;
     string header = null;
     foreach(XmlNode child in node.ChildNodes) {
         if(child.NodeType != XmlNodeType.Element) {
             continue;
         }
         switch(child.Name) {
         case "userAgent":
             //match the user agent
             HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "match", ref match);
             _captureHeaderChecks.Add(new CheckPair("User-Agent", match));
             break;
         case "header":
             //match some arbitrary header
             HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "name", ref header);
             HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "match", ref match);
             _captureHeaderChecks.Add(new CheckPair(header, match));
             break;
         case "capability":
             //match against an already set capability
             HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "name", ref header);
             HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "match", ref match);
             _captureCapabilityChecks.Add(new CheckPair(header, match));
             break;
         default:
             throw new ConfigurationErrorsException(SR.GetString(SR.Config_invalid_element, child.ToString()), child);
         }
     }
     return;
 }
        /*
        /* 
        <identification>
        <userAgent match="xxx" />
        <header name="HTTP_X_JPHONE_DISPLAY" match="xxx" />
        <capability name="majorVersion" match="^6$" />
        </identification>
        <capture>
        <header name="HTTP_X_UP_DEVCAP_NUMSOFTKEYS" match="?'softkeys'\d+)" />
        </capture>
        */
        internal void ProcessIdentificationNode(XmlNode node, BrowserCapsElementType elementType) {
            string match = null;
            string header = null;
            bool nonMatch;
            bool emptyIdentification = true;

            foreach(XmlNode child in node.ChildNodes) {
                match = String.Empty;
                nonMatch = false;
                if(child.NodeType != XmlNodeType.Element) {
                    continue;
                }

                switch (child.Name) {
                    case "userAgent":
                        emptyIdentification = false;

                        //match the user agent
                        HandlerBase.GetAndRemoveNonEmptyStringAttribute(child, "match", ref match);
                        if (String.IsNullOrEmpty(match)) {
                            HandlerBase.GetAndRemoveNonEmptyStringAttribute(child, "nonMatch", ref match);

                            if (String.IsNullOrEmpty(match)) {
                                HandleMissingMatchAndNonMatchError(child);
                            }

                            nonMatch = true;
                        }
                        _idHeaderChecks.Add(new CheckPair("User-Agent", match, nonMatch));
                        if (nonMatch == false) {
                            DisallowNonMatchAttribute(child);
                        }

                        break;

                    case "header":
                        emptyIdentification = false;

                        //match some arbitrary header
                        HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "name", ref header);
                        HandlerBase.GetAndRemoveNonEmptyStringAttribute(child, "match", ref match);
                        if (String.IsNullOrEmpty(match)) {
                            HandlerBase.GetAndRemoveNonEmptyStringAttribute(child, "nonMatch", ref match);

                            if (String.IsNullOrEmpty(match)) {
                                HandleMissingMatchAndNonMatchError(child);
                            }

                            nonMatch = true;
                        }
                        _idHeaderChecks.Add(new CheckPair(header, match, nonMatch));
                        if (nonMatch == false) {
                            DisallowNonMatchAttribute(child);
                        }
                        break;

                    case "capability":
                        emptyIdentification = false;

                        //match against an already set capability
                        HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "name", ref header);
                        HandlerBase.GetAndRemoveNonEmptyStringAttribute(child, "match", ref match);
                        if (String.IsNullOrEmpty(match)) {
                            HandlerBase.GetAndRemoveNonEmptyStringAttribute(child, "nonMatch", ref match);

                            if (String.IsNullOrEmpty(match)) {
                                HandleMissingMatchAndNonMatchError(child);
                            }

                            nonMatch = true;
                        }
                        _idCapabilityChecks.Add(new CheckPair(header, match, nonMatch));
                        //verify that match and nonMatch are not both specified
                        if (nonMatch == false) {
                            DisallowNonMatchAttribute(child);
                        }
                        break;
                    default:
                        throw new ConfigurationErrorsException(SR.GetString(SR.Config_invalid_element, child.ToString()), child);
                }
            }

            if (emptyIdentification) {
                throw new ConfigurationErrorsException(SR.GetString(SR.Browser_empty_identification), node);
            }

            return;
        }
        /*
         * /*
         * <identification>
         * <userAgent match="xxx" />
         * <header name="HTTP_X_JPHONE_DISPLAY" match="xxx" />
         * <capability name="majorVersion" match="^6$" />
         * </identification>
         * <capture>
         * <header name="HTTP_X_UP_DEVCAP_NUMSOFTKEYS" match="?'softkeys'\d+)" />
         * </capture>
         */
        internal void ProcessIdentificationNode(XmlNode node, BrowserCapsElementType elementType)
        {
            string match  = null;
            string header = null;
            bool   nonMatch;
            bool   emptyIdentification = true;

            foreach (XmlNode child in node.ChildNodes)
            {
                match    = String.Empty;
                nonMatch = false;
                if (child.NodeType != XmlNodeType.Element)
                {
                    continue;
                }

                switch (child.Name)
                {
                case "userAgent":
                    emptyIdentification = false;

                    //match the user agent
                    HandlerBase.GetAndRemoveNonEmptyStringAttribute(child, "match", ref match);
                    if (String.IsNullOrEmpty(match))
                    {
                        HandlerBase.GetAndRemoveNonEmptyStringAttribute(child, "nonMatch", ref match);

                        if (String.IsNullOrEmpty(match))
                        {
                            HandleMissingMatchAndNonMatchError(child);
                        }

                        nonMatch = true;
                    }
                    _idHeaderChecks.Add(new CheckPair("User-Agent", match, nonMatch));
                    if (nonMatch == false)
                    {
                        DisallowNonMatchAttribute(child);
                    }

                    break;

                case "header":
                    emptyIdentification = false;

                    //match some arbitrary header
                    HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "name", ref header);
                    HandlerBase.GetAndRemoveNonEmptyStringAttribute(child, "match", ref match);
                    if (String.IsNullOrEmpty(match))
                    {
                        HandlerBase.GetAndRemoveNonEmptyStringAttribute(child, "nonMatch", ref match);

                        if (String.IsNullOrEmpty(match))
                        {
                            HandleMissingMatchAndNonMatchError(child);
                        }

                        nonMatch = true;
                    }
                    _idHeaderChecks.Add(new CheckPair(header, match, nonMatch));
                    if (nonMatch == false)
                    {
                        DisallowNonMatchAttribute(child);
                    }
                    break;

                case "capability":
                    emptyIdentification = false;

                    //match against an already set capability
                    HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "name", ref header);
                    HandlerBase.GetAndRemoveNonEmptyStringAttribute(child, "match", ref match);
                    if (String.IsNullOrEmpty(match))
                    {
                        HandlerBase.GetAndRemoveNonEmptyStringAttribute(child, "nonMatch", ref match);

                        if (String.IsNullOrEmpty(match))
                        {
                            HandleMissingMatchAndNonMatchError(child);
                        }

                        nonMatch = true;
                    }
                    _idCapabilityChecks.Add(new CheckPair(header, match, nonMatch));
                    //verify that match and nonMatch are not both specified
                    if (nonMatch == false)
                    {
                        DisallowNonMatchAttribute(child);
                    }
                    break;

                default:
                    throw new ConfigurationErrorsException(SR.GetString(SR.Config_invalid_element, child.ToString()), child);
                }
            }

            if (emptyIdentification)
            {
                throw new ConfigurationErrorsException(SR.GetString(SR.Browser_empty_identification), node);
            }

            return;
        }
        internal void ProcessIdentificationNode(System.Xml.XmlNode node, BrowserCapsElementType elementType)
        {
            string val   = null;
            string str2  = null;
            bool   flag2 = true;

            foreach (System.Xml.XmlNode node2 in node.ChildNodes)
            {
                val = string.Empty;
                bool nonMatch = false;
                if (node2.NodeType == XmlNodeType.Element)
                {
                    string name = node2.Name;
                    if (name == null)
                    {
                        goto Label_01BB;
                    }
                    if (!(name == "userAgent"))
                    {
                        if (name == "header")
                        {
                            goto Label_00E1;
                        }
                        if (name == "capability")
                        {
                            goto Label_0151;
                        }
                        goto Label_01BB;
                    }
                    flag2 = false;
                    System.Web.Configuration.HandlerBase.GetAndRemoveNonEmptyStringAttribute(node2, "match", ref val);
                    if (string.IsNullOrEmpty(val))
                    {
                        System.Web.Configuration.HandlerBase.GetAndRemoveNonEmptyStringAttribute(node2, "nonMatch", ref val);
                        if (string.IsNullOrEmpty(val))
                        {
                            this.HandleMissingMatchAndNonMatchError(node2);
                        }
                        nonMatch = true;
                    }
                    this._idHeaderChecks.Add(new CheckPair("User-Agent", val, nonMatch));
                    if (!nonMatch)
                    {
                        this.DisallowNonMatchAttribute(node2);
                    }
                }
                continue;
Label_00E1:
                flag2 = false;
                System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "name", ref str2);
                System.Web.Configuration.HandlerBase.GetAndRemoveNonEmptyStringAttribute(node2, "match", ref val);
                if (string.IsNullOrEmpty(val))
                {
                    System.Web.Configuration.HandlerBase.GetAndRemoveNonEmptyStringAttribute(node2, "nonMatch", ref val);
                    if (string.IsNullOrEmpty(val))
                    {
                        this.HandleMissingMatchAndNonMatchError(node2);
                    }
                    nonMatch = true;
                }
                this._idHeaderChecks.Add(new CheckPair(str2, val, nonMatch));
                if (!nonMatch)
                {
                    this.DisallowNonMatchAttribute(node2);
                }
                continue;
Label_0151:
                flag2 = false;
                System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "name", ref str2);
                System.Web.Configuration.HandlerBase.GetAndRemoveNonEmptyStringAttribute(node2, "match", ref val);
                if (string.IsNullOrEmpty(val))
                {
                    System.Web.Configuration.HandlerBase.GetAndRemoveNonEmptyStringAttribute(node2, "nonMatch", ref val);
                    if (string.IsNullOrEmpty(val))
                    {
                        this.HandleMissingMatchAndNonMatchError(node2);
                    }
                    nonMatch = true;
                }
                this._idCapabilityChecks.Add(new CheckPair(str2, val, nonMatch));
                if (!nonMatch)
                {
                    this.DisallowNonMatchAttribute(node2);
                }
                continue;
                Label_01BB :;
                throw new ConfigurationErrorsException(System.Web.SR.GetString("Config_invalid_element", new object[] { node2.ToString() }), node2);
            }
            if (flag2)
            {
                throw new ConfigurationErrorsException(System.Web.SR.GetString("Browser_empty_identification"), node);
            }
        }
 internal void ProcessIdentificationNode(System.Xml.XmlNode node, BrowserCapsElementType elementType)
 {
     string val = null;
     string str2 = null;
     bool flag2 = true;
     foreach (System.Xml.XmlNode node2 in node.ChildNodes)
     {
         val = string.Empty;
         bool nonMatch = false;
         if (node2.NodeType == XmlNodeType.Element)
         {
             string name = node2.Name;
             if (name == null)
             {
                 goto Label_01BB;
             }
             if (!(name == "userAgent"))
             {
                 if (name == "header")
                 {
                     goto Label_00E1;
                 }
                 if (name == "capability")
                 {
                     goto Label_0151;
                 }
                 goto Label_01BB;
             }
             flag2 = false;
             System.Web.Configuration.HandlerBase.GetAndRemoveNonEmptyStringAttribute(node2, "match", ref val);
             if (string.IsNullOrEmpty(val))
             {
                 System.Web.Configuration.HandlerBase.GetAndRemoveNonEmptyStringAttribute(node2, "nonMatch", ref val);
                 if (string.IsNullOrEmpty(val))
                 {
                     this.HandleMissingMatchAndNonMatchError(node2);
                 }
                 nonMatch = true;
             }
             this._idHeaderChecks.Add(new CheckPair("User-Agent", val, nonMatch));
             if (!nonMatch)
             {
                 this.DisallowNonMatchAttribute(node2);
             }
         }
         continue;
     Label_00E1:
         flag2 = false;
         System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "name", ref str2);
         System.Web.Configuration.HandlerBase.GetAndRemoveNonEmptyStringAttribute(node2, "match", ref val);
         if (string.IsNullOrEmpty(val))
         {
             System.Web.Configuration.HandlerBase.GetAndRemoveNonEmptyStringAttribute(node2, "nonMatch", ref val);
             if (string.IsNullOrEmpty(val))
             {
                 this.HandleMissingMatchAndNonMatchError(node2);
             }
             nonMatch = true;
         }
         this._idHeaderChecks.Add(new CheckPair(str2, val, nonMatch));
         if (!nonMatch)
         {
             this.DisallowNonMatchAttribute(node2);
         }
         continue;
     Label_0151:
         flag2 = false;
         System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "name", ref str2);
         System.Web.Configuration.HandlerBase.GetAndRemoveNonEmptyStringAttribute(node2, "match", ref val);
         if (string.IsNullOrEmpty(val))
         {
             System.Web.Configuration.HandlerBase.GetAndRemoveNonEmptyStringAttribute(node2, "nonMatch", ref val);
             if (string.IsNullOrEmpty(val))
             {
                 this.HandleMissingMatchAndNonMatchError(node2);
             }
             nonMatch = true;
         }
         this._idCapabilityChecks.Add(new CheckPair(str2, val, nonMatch));
         if (!nonMatch)
         {
             this.DisallowNonMatchAttribute(node2);
         }
         continue;
     Label_01BB:;
         throw new ConfigurationErrorsException(System.Web.SR.GetString("Config_invalid_element", new object[] { node2.ToString() }), node2);
     }
     if (flag2)
     {
         throw new ConfigurationErrorsException(System.Web.SR.GetString("Browser_empty_identification"), node);
     }
 }
 internal void ProcessCaptureNode(System.Xml.XmlNode node, BrowserCapsElementType elementType)
 {
     string val = null;
     string str2 = null;
     foreach (System.Xml.XmlNode node2 in node.ChildNodes)
     {
         if (node2.NodeType == XmlNodeType.Element)
         {
             string name = node2.Name;
             if (name == null)
             {
                 goto Label_00F6;
             }
             if (!(name == "userAgent"))
             {
                 if (name == "header")
                 {
                     goto Label_0094;
                 }
                 if (name == "capability")
                 {
                     goto Label_00C5;
                 }
                 goto Label_00F6;
             }
             System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "match", ref val);
             this._captureHeaderChecks.Add(new CheckPair("User-Agent", val));
         }
         continue;
     Label_0094:
         System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "name", ref str2);
         System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "match", ref val);
         this._captureHeaderChecks.Add(new CheckPair(str2, val));
         continue;
     Label_00C5:
         System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "name", ref str2);
         System.Web.Configuration.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(node2, "match", ref val);
         this._captureCapabilityChecks.Add(new CheckPair(str2, val));
         continue;
     Label_00F6:;
         throw new ConfigurationErrorsException(System.Web.SR.GetString("Config_invalid_element", new object[] { node2.ToString() }), node2);
     }
 }