Beispiel #1
0
 private static void DoTransferUntilSuccess(AccountBase from, long amount)
 {
     while (true)
     {
         long expectedAmount = from.GetBalance() + amount;
         try
         {
             from.Transfer(amount);
             break;
         }
         catch (NetworkTransferException)
         {
             if (from.GetBalance() == expectedAmount)
             {
                 break;
             }
         }
     }
     return;
 }
Beispiel #2
0
 public NetworkAccount(AccountBase remoteAccount)
 {
     this._account = remoteAccount;
 }