Пример #1
0
 public RechargeHandler(PrePaidAccountRepository repository, RechargePolicy rechargePolicy,
                        PrePaidAccountHistoryDao historyDao, Clock clock)
 {
     _repository     = repository;
     _rechargePolicy = rechargePolicy;
     _historyDao     = historyDao;
     _clock          = clock;
 }
Пример #2
0
 public Context(IServiceProvider serviceProvider)
 {
     _scope           = serviceProvider.CreateScope();
     _repository      = _scope.ServiceProvider.GetService <PrePaidAccountRepository>();
     _rechargeHandler = _scope.ServiceProvider.GetService <CommandHandler <Recharge, Recharged> >();
     _historyDao      = _scope.ServiceProvider.GetService <PrePaidAccountHistoryDao>();
     _clock           = (FakeClock)_scope.ServiceProvider.GetService <Clock>();
 }