示例#1
0
 public void ProcessTransaction(Transaction transaction)
 {
     Task.Factory.StartNew(() =>
     {
         Logging.WriteLine("Processing a transaction of $"
             + transaction.CalculateTotalTransaction());
         _accountRepository.ProcessTransaction(transaction);
     });
 }
示例#2
0
 public void ProcessTransaction(Transaction transaction)
 {
     Task.Factory.StartNew(() =>
     {
         Thread.Sleep(100);
         Logging.WriteLine("Processing a transaction of $"
                           + transaction.CalculateTotalTransaction());
         _accountRepository.ProcessTransactions(transaction);
     });
     //Logging.WriteLine("Processing a transaction of $" + transaction.CalculateTotalTransaction());
     //_accountRepository.ProcessTransactions(transaction);
     //return CheckBalance();
 }
示例#3
0
 public int ProcessTransaction(Transaction transaction)
 {
     Logging.WriteLine($"Processing a transaction of $ {transaction.CalculateTotalTransaction()}");
     _accountRepository.ProcessTransaction(transaction);
     return(CheckBalance());
 }
示例#4
0
 public virtual void ProcessTransaction(Transaction transaction)
 {
     if (transaction.CalculateTotalTransaction() == 0) return;
     _transactions.Add(transaction);
 }