Пример #1
0
 //Executa um Put com o conteudo do registo "register" na key "key"
 public void PutInternal(int register, string key)
 {
     if (SuperTransaction != null &&
         SuperTransaction.PutValue(key, Registers[register - 1]) == false)
     {
         Console.BackgroundColor = ConsoleColor.Red;
         SuperTransaction = null;
     }
 }
Пример #2
0
 //Executa um get na key "key" e guarda o conteudo no register
 public void GetInternal(int register, string key)
 {
     string returnValue =null;
     if(SuperTransaction!=null) returnValue=  SuperTransaction.GetValue(key);
     if (returnValue == null)
     {
         Console.BackgroundColor = ConsoleColor.Red;
         SuperTransaction = null;
     }
     else Registers[register - 1] = returnValue;
 }
Пример #3
0
 //mete o valor "value" na key "key"
 public void PutVAlInternal(string key, string value)
 {
     if (SuperTransaction != null &&
         SuperTransaction.PutValue(key, value) == false)
     {
         Console.BackgroundColor = ConsoleColor.Red;
         SuperTransaction = null;
     }
 }
Пример #4
0
 public void BeginTxInternal()
 {
     SuperTransaction = new Transaction();
 }
Пример #5
0
 public async Task <Return> BroadcastTransactionAsync(Transaction transaction)
 {
     return(await _grpcClient.BroadcastTransactionAsync(transaction));
 }