public void AddCommand(string command, Func<IRequest, IEnumerable<IResponse>> handler, DataExpectation dataExpectation) {
     _commands[command] = new SyncCommandRegistration(
         dataExpectation,
         (client, cmd, dataLength, arguments, errorHandler) =>
             new SyncMultiCommandHandler(client, cmd, arguments, dataLength, handler, errorHandler)
     );
 }
 public void AddCommand(string command, Action<IRequest, Action<IResponse>> handler, DataExpectation dataExpectation) {
     _commands[command] = new AsyncCommandRegistration(
         dataExpectation,
         (client, cmd, dataLength, arguments, errorHandler) =>
             new AsyncSingleCommandHandler(client, cmd, arguments, dataLength, handler, errorHandler)
     );
 }
 public IAsyncFluentCommandRegistration ExpectsNoData() {
     _dataExpectation = DataExpectation.Never;
     return this;
 }
 public IAsyncFluentCommandRegistration ExpectsData() {
     _dataExpectation = DataExpectation.Always;
     return this;
 }