nope/modules/mod-Broker/test/test-dynamic-loading.ts

38 lines
936 B
TypeScript
Raw Normal View History

2020-09-10 16:21:19 +00:00
/**
* @author Martin Karkowski
* @email m.karkowski@zema.de
* @create date 2018-05-22 01:14:10
* @modify date 2018-07-02 05:31:10
* @desc [description]
*/
import 'reflect-metadata';
import { Builder } from '../../ZISS-Assembly-Builder/src/Container-Builder.FileLoader';
import { IPubSubSystem } from '../../ZISS-Publish-And-Subscribe-System/type/interfaces';
import * as BROKER from '../../ZISS-Broker/assembly/manual-assembly';
const _builder = Builder.instance;
Builder.load();
Builder.on('loaded', () => {
/** Verfy whether the System is fully loaded or not and Singletons work correctly. */
const loader = _builder.container.get<BROKER.FilebasedBroker>(BROKER.TYPES.BrokerFilebased);
const func = async function () {
// await loader.scanModules();
await loader.loadConfiguration();
setTimeout(()=>{
console.log('Closing');
},100)
}
func();
})