feat: Getter asyncCount, syncCount und totalCount zu UpdateService hinzugefügt.
This commit is contained in:
@@ -10,6 +10,18 @@ export class UpdateService {
|
|||||||
private async_actions: Array<() => Promise<void>> = [];
|
private async_actions: Array<() => Promise<void>> = [];
|
||||||
private actions: Array<() => void> = [];
|
private actions: Array<() => void> = [];
|
||||||
|
|
||||||
|
get asyncCount() {
|
||||||
|
return this.async_actions.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
get syncCount() {
|
||||||
|
return this.actions.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
get totalCount() {
|
||||||
|
return this.asyncCount + this.syncCount;
|
||||||
|
}
|
||||||
|
|
||||||
addAsync(action: () => Promise<void>): void {
|
addAsync(action: () => Promise<void>): void {
|
||||||
this.async_actions.push(action);
|
this.async_actions.push(action);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user