public void Reading_value_should_succeed() { var reader = new RedisReader(_redis); var value = reader.Read(KEY); Assert.AreEqual("test", value); }
static RedisScan ParseStream(Stream stream) { RedisReader.ExpectType(stream, RedisMessage.MultiBulk); long count = RedisReader.ReadInt(stream, false); RedisScan scan = new RedisScan(); scan.Cursor = Int64.Parse(RedisReader.Read(stream).ToString()); RedisReader.ExpectType(stream, RedisMessage.MultiBulk); scan.Items = new string[RedisReader.ReadInt(stream, false)]; for (int i = 0; i < scan.Items.Length; i++) { scan.Items[i] = RedisReader.Read(stream).ToString(); } return(scan); }
public override object Parse(RedisReader reader) { return(reader.Read(true)); }