public void Setup() { var executionRepository = new ExecutionRepository(); IMailbox mailbox = executionRepository; IReportCommandExecution reportCommandExecution = executionRepository; _dispatcher = new MyDispatcher(reportCommandExecution, mailbox); }
public MyDispatcher(IReportCommandExecution reportCommandExecution, IMailbox mailbox) { _reportCommandExecution = reportCommandExecution; _mailbox = mailbox; _commandToHandlerMapping = new Dictionary <Type, Type>(); _queryToHandlerMapping = new Dictionary <Type, Type>(); Discover(); }
public MyFirstCommandHandler(IReportCommandExecution reportCommandExecution) { _reportCommandExecution = reportCommandExecution; }