Exemple #1
0
        public Account BuildSavingAccount(IAccountBuilder builder)
        {
            builder.AddAccountNumber(654356);
            builder.WithSavingBalance();

            return(builder.GetAccount());
        }
Exemple #2
0
        public Account BuildLoanAccount(IAccountBuilder builder)
        {
            builder.AddAccountNumber(123456);
            builder.WithLoanAmount(500000);
            builder.AddInterestRate(10.5);

            return(builder.GetAccount());
        }
Exemple #3
0
 private BankService(IRepository <Account> accountRepository,
                     IAccountBuilder accountBuilder)
 {
     _repository = accountRepository;
     _builder    = accountBuilder;
 }
Exemple #4
0
 public AccountDirector(IAccountBuilder builder)
 {
     _builder = builder;
 }