示例#1
0
        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;
        }
示例#2
0
 public void Handle(CommandFailed <FirstCommand> firstCommandFailed)
 {
     _secondCommandHandler = new NullSecondCommandHandler(_eventAggregator);
 }
示例#3
0
 public void Handle(Found <Nothing> foundNothing)
 {
     _firstCommandHandler  = new NullFirstCommandHandler(_eventAggregator);
     _secondCommandHandler = new NullSecondCommandHandler(_eventAggregator);
 }