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)); }
public DepositCommand(BankAccountReceiver account, int amount) : base(account, amount) => Success = true;
public WithdrawCommand(BankAccountReceiver account, int amount) : base(account, amount) { }
public BankAccountCommand(BankAccountReceiver account, int amount) { this.account = account; this.amount = amount; }