static void WriteBulkStringContent(IByteBufferAllocator allocator, IBulkStringRedisContent msg, List <object> output) { output.Add(msg.Content.Retain()); if (msg is ILastBulkStringRedisContent) { output.Add(allocator.Buffer(RedisConstants.EndOfLineLength).WriteShort(RedisConstants.EndOfLineShort)); } }
static void Write(IByteBufferAllocator allocator, IBulkStringRedisContent message, ICollection <object> output) { Contract.Requires(allocator != null); Contract.Requires(message != null); Contract.Requires(output != null); output.Add(message.Content.Retain()); if (message is ILastBulkStringRedisContent) { output.Add(allocator .Buffer(RedisConstants.EndOfLineLength) .WriteShort(RedisConstants.EndOfLine)); } }