// Token: 0x0600000E RID: 14 RVA: 0x00002338 File Offset: 0x00000538
        private void ProcessElement(XmlReader reader)
        {
            string localName;

            if ((localName = reader.LocalName) != null)
            {
                if (!(localName == "RulePack"))
                {
                    if (!(localName == "Entity"))
                    {
                        if (!(localName == "Resource"))
                        {
                            if (localName == "Name")
                            {
                                if (this.currentResource != null && reader.GetAttribute("default") != null)
                                {
                                    this.isRuleName = true;
                                }
                            }
                        }
                        else
                        {
                            this.currentResource = reader.GetAttribute("idRef");
                        }
                    }
                    else
                    {
                        string attribute = reader.GetAttribute("id");
                        if (!string.IsNullOrEmpty(attribute))
                        {
                            if (this.ruleIdToCode.ContainsKey(attribute))
                            {
                                throw new InvalidDataException(string.Format(CultureInfo.InvariantCulture, "Rule XML Contains duplicate id : [{0}]", new object[]
                                {
                                    attribute
                                }));
                            }
                            long num = ClassificationRuleSet.CreateGuidHash(new Guid(attribute));
                            if (this.codeToRuleId.ContainsKey(num))
                            {
                                throw new InvalidDataException(string.Format(CultureInfo.InvariantCulture, "Rule XML Contains rules ids with duplicate hash : [{0}]", new object[]
                                {
                                    num
                                }));
                            }
                            this.ruleIdToCode[attribute] = num;
                            this.codeToRuleId[num]       = attribute;
                        }
                    }
                }
                else
                {
                    this.packageId = reader.GetAttribute("id");
                }
            }
            if (!reader.IsEmptyElement)
            {
                this.parseStack.Push(reader.LocalName);
            }
        }
        // Token: 0x0600000A RID: 10 RVA: 0x00002248 File Offset: 0x00000448
        private bool HandleRead(XmlReader reader, XmlWriter xw)
        {
            if (!reader.Read())
            {
                return(false);
            }
            XmlNodeType nodeType = reader.NodeType;

            switch (nodeType)
            {
            case XmlNodeType.Element:
                this.ProcessElement(reader);
                ClassificationRuleSet.WriteElement(reader, xw);
                break;

            case XmlNodeType.Attribute:
                break;

            case XmlNodeType.Text:
                this.ProcessTextNode(reader);
                ClassificationRuleSet.WriteTextNode(reader, xw);
                break;

            default:
                if (nodeType == XmlNodeType.EndElement)
                {
                    this.ProcessEndElement(reader);
                    ClassificationRuleSet.WriteEndElement(xw);
                }
                break;
            }
            return(true);
        }
 // Token: 0x06000010 RID: 16 RVA: 0x000024FC File Offset: 0x000006FC
 private void ProcessTextNode(XmlReader reader)
 {
     if (this.isRuleName)
     {
         string value  = reader.Value;
         string value2 = ClassificationRuleSet.RemoveUnsafeCharacters(value);
         if (this.ruleNameToRuleId.ContainsKey(value))
         {
             throw new InvalidDataException(string.Format(CultureInfo.InvariantCulture, "Rule XML Contains rules with duplicate names : [{0}]", new object[]
             {
                 value
             }));
         }
         this.ruleIdToRuleName[this.currentResource] = value;
         this.ruleNameToRuleId[value] = this.currentResource;
         this.ruleIdToQueryIdentifier[this.currentResource] = value2;
         this.isRuleName = false;
     }
 }