コード例 #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));
 }
コード例 #2
0
 public DepositCommand(BankAccountReceiver account, int amount)
     : base(account, amount) => Success = true;
コード例 #3
0
 public WithdrawCommand(BankAccountReceiver account, int amount)
     : base(account, amount)
 {
 }
コード例 #4
0
 public BankAccountCommand(BankAccountReceiver account, int amount)
 {
     this.account = account;
     this.amount  = amount;
 }