public CommandDispatcher(ICommandRegistry commandRegistry, ICommandTypeHelper commandTypeHelper,
                          IResponseSender responseSender, IEventBus eventBus, ICommandParser commandParser)
 {
     _commandRegistry      = commandRegistry;
     _commandTypeHelper    = commandTypeHelper;
     this._eventBus        = eventBus;
     _commandParser        = commandParser;
     _channelClosedHandler = OnChannelClosed;
     _eventBus.Add(EventKeys.ChannelClosed, _channelClosedHandler);
 }
 public CommandParser(ICommandTypeHelper commandTypeHelper, ICommandRegistry commandRegistry)
 {
     _commandTypeHelper = commandTypeHelper;
     _commandRegistry   = commandRegistry;
     Cleanup();
 }