예제 #1
0
        public async Task <Asset> GetAsset(UInt256 assetId)
        {
            var raw = await _redisDbContext.Get(assetId.BuildStateAssetKey());

            return(raw.IsNull ? null : _binarySerializer.Deserialize <Asset>(raw));
        }
예제 #2
0
 public async Task DeleteAsset(UInt256 assetId)
 {
     await _redisDbContext.Delete(assetId.BuildStateAssetKey());
 }
예제 #3
0
        public async Task <Asset> GetAsset(UInt256 assetId)
        {
            var raw = await _redisDbJsonContext.Get(assetId.BuildStateAssetKey());

            return(raw.IsNull ? null : _jsonConverter.DeserializeObject <Asset>(raw));
        }