/// <summary>Inherited</summary> public void LoadModule(ModuleInfo moduleInfo) { Assembly assembly = LoadAssembly(moduleInfo); IModuleBootstraper bootstraper = CreateBootstraper(assembly); ExecuteOnLoad(bootstraper); RegisterModule(moduleInfo, bootstraper); }
private void ExecuteOnLoad(IModuleBootstraper bootstraper) { using (var waitHandle = new AutoResetEvent(false)) { Action @delegate = () => { bootstraper.OnLoad(); waitHandle.Set(); }; _guiThreadProvider.RunInGui(@delegate); waitHandle.WaitOne(); } }
private void RegisterModule(ModuleInfo moduleInfo, IModuleBootstraper bootstraper) { _loadedModules.Add(bootstraper); _loadedModuleInfos.Add(moduleInfo); }