lib/definitions/aggregate.js
function (commandHandler) {
    if (!commandHandler || !_.isObject(commandHandler) || !_.isFunction(commandHandler.useAggregate)) {
      var err = new Error('Please inject a valid commandHandler object!');
      debug(err);
      throw err;
    }

    commandHandler.useAggregate(this);

    if (this.commandHandlers.indexOf(commandHandler) < 0) {
      this.commandHandlers.push(commandHandler);
    }
  }
function (commandHandler) {
    if (!commandHandler || !_.isObject(commandHandler) || !_.isFunction(commandHandler.useAggregate)) {
      var err = new Error('Please inject a valid commandHandler object!');
      debug(err);
      throw err;
    }

    commandHandler.useAggregate(this);

    if (this.commandHandlers.indexOf(commandHandler) < 0) {
      this.commandHandlers.push(commandHandler);
    }
  }
function ( commandHandler ) { if ( ! commandHandler || ! _ . isObject ( commandHandler ) || ! _ . isFunction ( commandHandler . useAggregate ) ) { var err = new Error ( 'Please inject a valid commandHandler object!' ) ; debug ( err ) ; throw err ; } commandHandler . useAggregate ( this ) ; if ( this . commandHandlers . indexOf ( commandHandler ) < 0 ) { this . commandHandlers . push ( commandHandler ) ; } }
Add commandHandler module.
@param {CommandHandler} commandHandler The commandHandler module to be injected.
Add commandHandler module .