Example #1
0
 public Bank(double commission, IPercentStrategy percentStrategy,
             double maxAmountForNonTrusted, DateController dateController)
 {
     AccountFactory = new AccountFactory(commission, percentStrategy,
                                         account => Accounts.Add(account), dateController);
     MaxAmountForNonTrusted = maxAmountForNonTrusted;
 }
 public AccountFactory(double commission, IPercentStrategy percentStrategy,
                       Action <IAccount> accountCreated, DateController dateController)
 {
     _commission      = commission;
     _percentStrategy = percentStrategy;
     _accountCreated  = accountCreated;
     _dateController  = dateController;
 }