Esempio n. 1
0
 public void Setup()
 {
     _categoryRepo = DependencyResolver.Container.GetInstance<ICategoryRepositoryAsync>();
     _commandBus = DependencyResolver.Container.GetInstance<ICommandBus>();
     _eventBus = DependencyResolver.Container.GetInstance<IEventBus>();
     _userCategoryRepository = DependencyResolver.Container.GetInstance<IRepository<UserCategory>>();
     _eventHandlerFactory = DependencyResolver.Container.GetInstance<IEventHandlerFactory>();
     _stateHelper = DependencyResolver.Container.GetInstance<IStateHelper>();
     _aggregateRepository = DependencyResolver.Container.GetInstance<IAggregateRepositoryAsync>();
     _eventRepository = DependencyResolver.Container.GetInstance<IEventRepositoryAsync>();
     _mementoRepository = DependencyResolver.Container.GetInstance<IMementoRepositoryAsync>();
     _questionRepository = DependencyResolver.Container.GetInstance<IQuestionRepositoryAsync>();
 }
Esempio n. 2
0
 public void Setup()
 {
     _categoryRepo           = DependencyResolver.Container.GetInstance <ICategoryRepositoryAsync>();
     _commandBus             = DependencyResolver.Container.GetInstance <ICommandBus>();
     _eventBus               = DependencyResolver.Container.GetInstance <IEventBus>();
     _userCategoryRepository = DependencyResolver.Container.GetInstance <IRepository <UserCategory> >();
     _eventHandlerFactory    = DependencyResolver.Container.GetInstance <IEventHandlerFactory>();
     _stateHelper            = DependencyResolver.Container.GetInstance <IStateHelper>();
     _aggregateRepository    = DependencyResolver.Container.GetInstance <IAggregateRepositoryAsync>();
     _eventRepository        = DependencyResolver.Container.GetInstance <IEventRepositoryAsync>();
     _mementoRepository      = DependencyResolver.Container.GetInstance <IMementoRepositoryAsync>();
     _questionRepository     = DependencyResolver.Container.GetInstance <IQuestionRepositoryAsync>();
 }
 public DatabaseEventStorage(
     IEventRepositoryAsync eventRepository,
     IAggregateRepositoryAsync aggregateRepository,
     IMementoRepositoryAsync mementoRepository,
     IEventBus eventBus)
 {
     _eventRepository     = eventRepository;
     _aggregateRepository = aggregateRepository;
     _mementoRepository   = mementoRepository;
     _eventBus            = eventBus;
     _eventMapper         = new EventMapper();
     _mementoMapper       = new MementoMapper();
     _aggregateMapper     = new AggregateMapper();
 }