Files
NapCatQQ/.pnpm-store/v3/files/1d/a29e9832544eab23d17f8e453057e12bc88da1ea47a81db223c5deb0975dbb6f6dfe7ef9cd3b4c2a6e150e3bd6660ef691bab810da4b4a7ef02b93df07bf42
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

35 lines
1.4 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServiceReferenceManager = void 0;
/**
* Manages references to core services used throughout the Container
* This class allows for proper synchronization of services during snapshot/restore operations
*/
class ServiceReferenceManager {
activationService;
bindingService;
deactivationService;
planResultCacheService;
#onResetComputedPropertiesListeners;
constructor(activationService, bindingService, deactivationService, planResultCacheService) {
this.activationService = activationService;
this.bindingService = bindingService;
this.deactivationService = deactivationService;
this.planResultCacheService = planResultCacheService;
this.#onResetComputedPropertiesListeners = [];
}
reset(activationService, bindingService, deactivationService) {
this.activationService = activationService;
this.bindingService = bindingService;
this.deactivationService = deactivationService;
this.planResultCacheService.clearCache();
for (const listener of this.#onResetComputedPropertiesListeners) {
listener();
}
}
onReset(listener) {
this.#onResetComputedPropertiesListeners.push(listener);
}
}
exports.ServiceReferenceManager = ServiceReferenceManager;
//# sourceMappingURL=ServiceReferenceManager.js.map