public void CopyTo(RedisClientInfo c) { c._store.Clear(); foreach (KeyValuePair <String, String> kvp in _store) { c._store.Add(kvp.Key, kvp.Value); } }
public RedisClientInfo[] GetClientList() { List <RedisClientInfo> rcis = new List <RedisClientInfo>(); String response = SendExpectString(RedisCommandsEx.CLIENT, "LIST".ToUtf8Bytes()); String[] sresponse = response.Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); foreach (string r in sresponse) { rcis.Add(RedisClientInfo.Parse(r)); } return(rcis.ToArray()); }
public static RedisClientInfo Parse(String data) { String[] sdata = data.Split(' '); RedisClientInfo rci = new RedisClientInfo(); foreach (String p in sdata) { String[] pentry = p.Split(new char[] { '=' }, 2); rci._store.Add(pentry[0], pentry[1]); } return(rci); }
public void CopyTo(RedisClientInfo c) { c._store.Clear(); foreach (KeyValuePair<String, String> kvp in _store) c._store.Add(kvp.Key, kvp.Value); }
public static RedisClientInfo Parse(String data) { String[] sdata = data.Split(' '); RedisClientInfo rci = new RedisClientInfo(); foreach (String p in sdata) { String[] pentry = p.Split(new char[] { '=' }, 2); rci._store.Add(pentry[0], pentry[1]); } return rci; }
public void KillClientConnection(RedisClientInfo rci) { SendExpectSuccess(RedisCommandsEx.CLIENT, "KILL".ToUtf8Bytes(), rci.Address.ToUtf8Bytes()); }