mirror of
https://gitee.com/bimuziyan/ccc-obfuscated-code.git
synced 2026-07-01 07:58:16 +08:00
23 lines
856 B
JavaScript
23 lines
856 B
JavaScript
import { id } from "../utils/id";
|
|
var Request = (function () {
|
|
function Request(serviceIdentifier, parentContext, parentRequest, bindings, target) {
|
|
this.id = 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;
|
|
}());
|
|
export { Request };
|