You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
946 B
24 lines
946 B
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
var id_1 = require("../utils/id");
|
|
var Request = (function () {
|
|
function Request(serviceIdentifier, parentContext, parentRequest, bindings, target) {
|
|
this.id = id_1.id();
|
|
this.serviceIdentifier = serviceIdentifier;
|
|
this.parentContext = parentContext;
|
|
this.parentRequest = parentRequest;
|
|
this.target = target;
|
|
this.childRequests = [];
|
|
this.bindings = (Array.isArray(bindings) ? bindings : [bindings]);
|
|
this.requestScope = parentRequest === null
|
|
? new Map()
|
|
: null;
|
|
}
|
|
Request.prototype.addChildRequest = function (serviceIdentifier, bindings, target) {
|
|
var child = new Request(serviceIdentifier, this.parentContext, this, bindings, target);
|
|
this.childRequests.push(child);
|
|
return child;
|
|
};
|
|
return Request;
|
|
}());
|
|
exports.Request = Request;
|
|
|