public RedisServerInfo GetServerInfo() { try { if (!Disposed) { var bytes = RunSyncTask(new RedisCommand(RedisConstants.UninitializedDbIndex, RedisCommandList.Info, RedisCommandType.SendAndReceive) { Priority = RedisCommandPriority.High }) as RedisBytes; if (!ReferenceEquals(bytes, null)) { var lines = bytes.Value.ToUTF8String(); if (!lines.IsEmpty()) { return(RedisServerInfo.Parse(lines)); } } } } catch (Exception) { } return(null); }
public RedisResult <RedisServerInfo> Info(RedisParam?section = null) { string lines; if (!section.HasValue || section.Value.IsNull) { lines = ExpectBulkString(new RedisCommand(RedisConstants.UninitializedDbIndex, RedisCommandList.Info)); } else { lines = ExpectBulkString(new RedisCommand(RedisConstants.UninitializedDbIndex, RedisCommandList.Info, section.Value)); } var info = RedisServerInfo.Parse(lines); return(new RedisResult <RedisServerInfo>(info)); }