public async Task DeleteIfExistsAsync(string assetPair, DateTime dateTime) { var blobId = MatrixEntity.GenerateBlobId(assetPair, dateTime); if (await BlobExistsAsync(blobId)) { await DeleteBlobAsync(blobId); } }
public async Task <MatrixBlob> GetAsync(string assetPair, DateTime dateTime) { var blobId = MatrixEntity.GenerateBlobId(assetPair, dateTime); if (!await BlobExistsAsync(blobId)) { return(null); } return((await GetBlobStringAsync(blobId)).DeserializeJson <MatrixBlob>()); }
public Task SaveAsync(MatrixBlob matrix) { var domain = Mapper.Map <Matrix>(matrix); return(SaveBlobAsync(MatrixEntity.GenerateBlobId(domain), matrix.ToJson())); }