示例#1
0
        public void Visit(object level, VisitArgs args)
        {
            if (args.Index > 0)
            {
                BinaryZPacker.Pack(_writeBuffer, args.Index);
            }

            if (level == null)
            {
                _writeBuffer.WriteByte(BinaryZPacker.Null);
                return;
            }

            _writeBuffer.WriteByte(BinaryZPacker.VariabelLength);

            if (args.IsRoot)
            {
                return;
            }
            _reservations.Push(_writer.Reserve());
        }
示例#2
0
 public void Write(byte value)
 {
     _writeBuffer.WriteByte(value);
 }