mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 15:16:28 +08:00
205cd7a86d
Closes: BS-2946
23 lines
546 B
TypeScript
23 lines
546 B
TypeScript
import { LifeCycleWatcher } from '../extension/index.js';
|
|
import { BlockServiceIdentifier } from '../identifier.js';
|
|
|
|
export class ServiceManager extends LifeCycleWatcher {
|
|
static override readonly key = 'serviceManager';
|
|
|
|
override mounted() {
|
|
super.mounted();
|
|
|
|
this.std.provider.getAll(BlockServiceIdentifier).forEach(service => {
|
|
service.mounted();
|
|
});
|
|
}
|
|
|
|
override unmounted() {
|
|
super.unmounted();
|
|
|
|
this.std.provider.getAll(BlockServiceIdentifier).forEach(service => {
|
|
service.unmounted();
|
|
});
|
|
}
|
|
}
|