1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.Request = void 0;
|
4 | const id_1 = require("../utils/id");
|
5 | class Request {
|
6 | constructor(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 | addChildRequest(serviceIdentifier, bindings, target) {
|
19 | const child = new Request(serviceIdentifier, this.parentContext, this, bindings, target);
|
20 | this.childRequests.push(child);
|
21 | return child;
|
22 | }
|
23 | }
|
24 | exports.Request = Request;
|
25 |
|
\ | No newline at end of file |