public void ProcessTransaction(Transaction transaction) { Task.Factory.StartNew(() => { Logging.WriteLine("Processing a transaction of $" + transaction.CalculateTotalTransaction()); _accountRepository.ProcessTransaction(transaction); }); }
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(); }
public int ProcessTransaction(Transaction transaction) { Logging.WriteLine($"Processing a transaction of $ {transaction.CalculateTotalTransaction()}"); _accountRepository.ProcessTransaction(transaction); return(CheckBalance()); }
public virtual void ProcessTransaction(Transaction transaction) { if (transaction.CalculateTotalTransaction() == 0) return; _transactions.Add(transaction); }