public T Get <T>(string key) { var data = _RedisDb.HashGet(key, _dataConverter.Serialize(key)); if (data.IsNull) { return(default(T)); } else { return(_dataConverter.Deserialize <T>(data.ToString())); } }
public void Enqueue(T t) { byte[] data = dataConverter.Serialize(t); try { DataBlock dataBlock = DataBlock.CreateByUserData(data); lock (enqueueLock) { fileManager.WriteQueueData(dataBlock.QueueData); } } catch (Exception e) { fileManager.WriteErrorQueueData(data, false); throw e; } }