refactor to allow switching ICategoryCollection context #40

This commit is contained in:
undergroundwires
2021-01-05 22:28:38 +01:00
parent 3455a2ca6c
commit 2e40605d59
32 changed files with 897 additions and 232 deletions

View File

@@ -1,7 +1,20 @@
import { ICategoryCollectionState } from './State/ICategoryCollectionState';
import { ICategoryCollection } from '@/domain/ICategoryCollection';
import { OperatingSystem } from '@/domain/OperatingSystem';
import { ISignal } from '@/infrastructure/Events/ISignal';
import { IApplication } from '@/domain/IApplication';
export interface IApplicationContext {
readonly currentOs: OperatingSystem;
readonly app: IApplication;
readonly collection: ICategoryCollection;
readonly state: ICategoryCollectionState;
readonly contextChanged: ISignal<IApplicationContextChangedEvent>;
changeContext(os: OperatingSystem): void;
}
export interface IApplicationContextChangedEvent {
readonly newState: ICategoryCollectionState;
readonly newCollection: ICategoryCollection;
readonly newOs: OperatingSystem;
}