Esempio n. 1
0
        public override void WriteStartTag(string name, TagType type, TagType listType, int count)
        {
            this.WriteStartTag(name, type);

            _state.StartList(listType, count);

            _writer.WriteAttributeString("limitType", listType.ToString());
        }
Esempio n. 2
0
        public override void WriteStartTag(string name, TagType type, TagType listType, int count)
        {
            // HACK: This is messy, rethink

            this.WriteStartTag(name, type);

            _state.StartList(listType, count);

            _stream.WriteByte((byte)listType);
            this.WriteValue(count);
        }
Esempio n. 3
0
        private void ReadChildValues(ICollection <Tag> value, TagType listType)
        {
            int depth;

            _state.StartList(listType, 0);

            this.SkipWhitespace();

            depth = _reader.Depth;

            if (_reader.NodeType != XmlNodeType.EndElement)
            {
                do
                {
                    if (_reader.NodeType == XmlNodeType.Element)
                    {
                        Tag child;

                        child = this.ReadTag(listType);
                        if (listType != TagType.None)
                        {
                            // sanity check as depending how you
                            // decided to load documents it is
                            // currently possible to skip some checks
                            child.Name = string.Empty;
                        }

                        value.Add(child);
                    }
                    else
                    {
                        _reader.Read();
                    }
                } while (_reader.Depth == depth && _reader.ReadState == ReadState.Interactive);
            }
            else
            {
                _reader.Read();
                this.SkipWhitespace();
            }
        }