Esempio n. 1
0
        public void Transfer(IWithdrawalAndDepositAccount from, IDepositAccount to, decimal amount)
        {
            if (from.Amount < amount)
            {
                throw new InvalidOperationException();
            }

            from.Withdraw(amount);
            to.Deposit(amount);
        }
Esempio n. 2
0
 public void DepositMoneyTo(IDepositAccount depositAccount, decimal amount)
 {
     depositAccount.Deposit(amount);
 }