public void EncodeEmptyArray()
        {
            IArrayRedisMessage msg = ArrayRedisMessage.Empty;

            Assert.True(this.channel.WriteOutbound(msg));

            IByteBuffer written = ReadAll(this.channel);

            Assert.Equal(BytesOf("*0\r\n"), BytesOf(written));
            written.Release();
        }
Пример #2
0
 void WriteArrayMessage(IByteBufferAllocator allocator, IArrayRedisMessage msg, List <object> output)
 {
     if (msg.IsNull)
     {
         this.WriteArrayHeader(allocator, msg.IsNull, RedisConstants.NullValue, output);
     }
     else
     {
         this.WriteArrayHeader(allocator, msg.IsNull, msg.Children.Count, output);
         foreach (IRedisMessage child in msg.Children)
         {
             this.WriteRedisMessage(allocator, child, output);
         }
     }
 }