Ejemplo n.º 1
0
        public byte[] Get(byte[] tableid, byte[] key)
        {
            NetMessage netMessage = Protocol_GetValue.CreateSendMsg(tableid, key, "", 0, true);

            actor.Tell(netMessage.ToBytes());
            return(K_V.Get(tableid.Concat(key).ToArray().ToHexString()).Result);
        }
Ejemplo n.º 2
0
        public T Get <T>(byte[] tableid, byte[] key = null) where T : class, ISerializable, new()
        {
            NetMessage netMessage = Protocol_GetValue.CreateSendMsg(tableid, key, "", 0, true);

            actor.Tell(netMessage.ToBytes());
            var str = key == null?tableid.ToHexString() : tableid.Concat(key).ToArray().ToHexString();

            var value = K_V.Get(str).Result;

            if (value == null || value.Length == 0)
            {
                return(null);
            }
            var a = value.AsSerializable <T>();

            return(a);
        }