public void ClientReply(ClientReplyType type) { var cmd = "CLIENT".SubCommand("REPLY").InputRaw(type); Adapter.TopOwner.LogCall(cmd, () => { using (var rds = Adapter.GetRedisSocket(null)) { rds.Write(cmd); switch (type) { case ClientReplyType.off: break; case ClientReplyType.on: rds.Read(cmd).ThrowOrNothing(); break; case ClientReplyType.skip: break; } } return(default(string)); }); }
public void ClientReply(ClientReplyType type) => _adapter.CheckSingle <string>(() => { var cmd = "CLIENT".SubCommand("REPLY").InputRaw(type); return(LogCall(cmd, () => { using (var rds = _adapter.GetRedisSocket(null)) { rds.Write(cmd); switch (type) { case ClientReplyType.Off: break; case ClientReplyType.On: cmd.Read <string>().ThrowOrValue(); break; case ClientReplyType.Skip: break; } } return default(string); })); });