public RES RedisExecute(string connection, string command, object[] paramArr) { if (!string.IsNullOrWhiteSpace(connection)) { return(RES.OK(REDIS.GetInst(0, connection).Execute(null, command, paramArr))); } else { return(RES.OK(REDIS.Current.Execute(null, command, paramArr))); } }
public static REDIS GetInst(int db = 0, string connection = "127.0.0.1:6379") { if (null == redis) { redis = ConnectionMultiplexer.Connect(connection); } if (null == REDIS.inst) { REDIS.inst = new REDIS(); REDIS.inst.db = redis.GetDatabase(0); REDIS.inst.server = redis.GetServer(connection); } return(REDIS.inst); }