GetObjectFromBytes() 정적인 개인적인 메소드

static private GetObjectFromBytes ( byte dataAsBytes ) : object
dataAsBytes byte
리턴 object
예제 #1
0
        private object internalGet(int index)
        {
            var obj = innerCollection[index];

            if (obj != null || redisUtility == null)
            {
                return(obj);
            }
            object serializedItem;

            lock (serializedItemsLock)
            {
                serializedItem = serializedItems.Get(index);
            }
            if (serializedItem == null)
            {
                return(null);
            }
            innerCollection[index] = obj = redisUtility.GetObjectFromBytes((byte[])serializedItem);
            return(obj);
        }
예제 #2
0
        public object Add(string key, object entry, DateTime utcExpiry)
        {
            key = GetKeyForRedis(key);
            TimeSpan expiryTime = utcExpiry - DateTime.UtcNow;

            string[] keyArgs   = new string[] { key };
            object[] valueArgs = new object[] { RedisUtility.GetBytesFromObject(entry), expiryTime.TotalMilliseconds };

            object rowDataFromRedis = redisConnection.Eval(addScript, keyArgs, valueArgs);

            return(RedisUtility.GetObjectFromBytes(redisConnection.GetOutputCacheDataFromResult(rowDataFromRedis)));
        }
예제 #3
0
 public object Get(string key)
 {
     key = GetKeyForRedis(key);
     byte[] data = redisConnection.Get(key);
     return(RedisUtility.GetObjectFromBytes(data));
 }