1 | define(["require", "exports", "../utils/id"], function (require, exports, id_1) {
|
2 | "use strict";
|
3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 | exports.Request = void 0;
|
5 | var Request = (function () {
|
6 | function Request(serviceIdentifier, parentContext, parentRequest, bindings, target) {
|
7 | this.id = (0, id_1.id)();
|
8 | this.serviceIdentifier = serviceIdentifier;
|
9 | this.parentContext = parentContext;
|
10 | this.parentRequest = parentRequest;
|
11 | this.target = target;
|
12 | this.childRequests = [];
|
13 | this.bindings = (Array.isArray(bindings) ? bindings : [bindings]);
|
14 | this.requestScope = parentRequest === null
|
15 | ? new Map()
|
16 | : null;
|
17 | }
|
18 | Request.prototype.addChildRequest = function (serviceIdentifier, bindings, target) {
|
19 | var child = new Request(serviceIdentifier, this.parentContext, this, bindings, target);
|
20 | this.childRequests.push(child);
|
21 | return child;
|
22 | };
|
23 | return Request;
|
24 | }());
|
25 | exports.Request = Request;
|
26 | });
|
27 |
|
\ | No newline at end of file |