Exemplo 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);
        }
Exemplo n.º 2
0
 public void DepositMoneyTo(IDepositAccount depositAccount, decimal amount)
 {
     depositAccount.Deposit(amount);
 }