コード例 #1
0
 public void CopyTo(RedisClientInfo c)
 {
     c._store.Clear();
     foreach (KeyValuePair <String, String> kvp in _store)
     {
         c._store.Add(kvp.Key, kvp.Value);
     }
 }
コード例 #2
0
        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());
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public void CopyTo(RedisClientInfo c)
 {
     c._store.Clear();
     foreach (KeyValuePair<String, String> kvp in _store)
         c._store.Add(kvp.Key, kvp.Value);
 }
コード例 #5
0
        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;
        }
コード例 #6
0
 public void KillClientConnection(RedisClientInfo rci)
 {
     SendExpectSuccess(RedisCommandsEx.CLIENT, "KILL".ToUtf8Bytes(), rci.Address.ToUtf8Bytes());
 }