private void ReadEndElement()
        {
            int num3;

            base.BufferReader.SkipByte();
            XmlBaseReader.XmlElementNode elementNode = base.ElementNode;
            int nameOffset = elementNode.NameOffset;
            int nameLength = elementNode.NameLength;

            byte[] buffer = base.BufferReader.GetBuffer(nameLength, out num3);
            for (int i = 0; i < nameLength; i++)
            {
                if (buffer[num3 + i] != buffer[nameOffset + i])
                {
                    this.ReadQualifiedName(this.prefix, this.localName);
                    XmlExceptionHelper.ThrowTagMismatch(this, elementNode.Prefix.GetString(), elementNode.LocalName.GetString(), this.prefix.GetString(), this.localName.GetString());
                }
            }
            base.BufferReader.Advance(nameLength);
            if (base.BufferReader.GetByte() != 0x3e)
            {
                this.SkipWhitespace();
                if (base.BufferReader.GetByte() != 0x3e)
                {
                    XmlExceptionHelper.ThrowTokenExpected(this, ">", (char)base.BufferReader.GetByte());
                }
            }
            base.BufferReader.SkipByte();
            base.MoveToEndElement();
        }
        private void ReadStartElement()
        {
            if (!this.buffered)
            {
                this.BufferElement();
            }
            XmlBaseReader.XmlElementNode node = base.EnterScope();
            node.NameOffset = base.BufferReader.Offset;
            this.ReadQualifiedName(node.Prefix, node.LocalName);
            node.NameLength = base.BufferReader.Offset - node.NameOffset;
            byte @byte = base.BufferReader.GetByte();

            while ((charType[@byte] & 4) != 0)
            {
                base.BufferReader.SkipByte();
                @byte = base.BufferReader.GetByte();
            }
            if ((@byte != 0x3e) && (@byte != 0x2f))
            {
                this.ReadAttributes();
                @byte = base.BufferReader.GetByte();
            }
            node.Namespace = base.LookupNamespace(node.Prefix);
            bool flag = false;

            if (@byte == 0x2f)
            {
                flag = true;
                base.BufferReader.SkipByte();
            }
            node.IsEmptyElement = flag;
            node.ExitScope      = flag;
            if (base.BufferReader.GetByte() != 0x3e)
            {
                XmlExceptionHelper.ThrowTokenExpected(this, ">", (char)base.BufferReader.GetByte());
            }
            base.BufferReader.SkipByte();
            node.BufferOffset = base.BufferReader.Offset;
        }