lib/definitions/context.js
function (aggregate) {
    if (!aggregate || !(aggregate instanceof Aggregate)) {
      throw new Error('Passed object should be an Aggregate');
    }

    aggregate.defineContext(this);

    if (this.aggregates.indexOf(aggregate) < 0) {
      this.aggregates.push(aggregate);
    }
  }
function (aggregate) {
    if (!aggregate || !(aggregate instanceof Aggregate)) {
      throw new Error('Passed object should be an Aggregate');
    }

    aggregate.defineContext(this);

    if (this.aggregates.indexOf(aggregate) < 0) {
      this.aggregates.push(aggregate);
    }
  }
function ( aggregate ) { if ( ! aggregate || ! ( aggregate instanceof Aggregate ) ) { throw new Error ( 'Passed object should be an Aggregate' ) ; } aggregate . defineContext ( this ) ; if ( this . aggregates . indexOf ( aggregate ) < 0 ) { this . aggregates . push ( aggregate ) ; } }
Adds an aggregate to this context.
@param {Aggregate} aggregate the aggregate that should be added
Adds an aggregate to this context .