Ejemplo n.º 1
0
 public BankAccountTransferCommand(BankAccountReceiver from, BankAccountReceiver to, int amount)
 {
     this.from   = from;
     this.to     = to;
     this.amount = amount;
     commands.Add(new WithdrawCommand(from, amount));
     commands.Add(new DepositCommand(to, amount));
 }
Ejemplo n.º 2
0
 public DepositCommand(BankAccountReceiver account, int amount)
     : base(account, amount) => Success = true;
Ejemplo n.º 3
0
 public WithdrawCommand(BankAccountReceiver account, int amount)
     : base(account, amount)
 {
 }
Ejemplo n.º 4
0
 public BankAccountCommand(BankAccountReceiver account, int amount)
 {
     this.account = account;
     this.amount  = amount;
 }