public Task( EventAggregator eventAggregator, Queries.IHandle <Query> queryHandler, Commands.IHandle <FirstCommand> firstCommandHandler, Commands.IHandle <SecondCommand> secondCommandHandler) { _eventAggregator = eventAggregator; _eventAggregator.Register <Found <Nothing> >(this); _eventAggregator.Register <Found <Something> >(this); _eventAggregator.Register <CommandFailed <FirstCommand> >(this); _queryHandler = queryHandler; _firstCommandHandler = firstCommandHandler; _secondCommandHandler = secondCommandHandler; }
public void Handle(CommandFailed <FirstCommand> firstCommandFailed) { _secondCommandHandler = new NullSecondCommandHandler(_eventAggregator); }
public void Handle(Found <Nothing> foundNothing) { _firstCommandHandler = new NullFirstCommandHandler(_eventAggregator); _secondCommandHandler = new NullSecondCommandHandler(_eventAggregator); }