Esempio n. 1
0
 public async Task <bool> PipelineSetDataAsync(Dictionary <StatePath, byte[]> pipelineSet)
 {
     try
     {
         var dict = pipelineSet.ToDictionary(kv => GetKey(kv.Key), kv => kv.Value);
         return(await _keyValueDatabase.PipelineSetAsync(_dbName, dict));
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         return(false);
     }
 }
Esempio n. 2
0
 public async Task PipelineSetAsync(IDictionary <string, byte[]> cache)
 {
     var dic = cache.ToDictionary(k => GetKey(k.Key), v => v.Value);
     await _keyValueDatabase.PipelineSetAsync(dic);
 }
Esempio n. 3
0
 public async Task AddOrUpdateReceiptsAsync(IEnumerable <TransactionReceipt> receipts)
 {
     var dict = receipts.ToDictionary(r => GetKey(r.TransactionId), r => r.ToByteArray());
     await _database.PipelineSetAsync(_dbName, dict);
 }