Esempio n. 1
0
        /// <summary>Inherited</summary>
        public void LoadModule(ModuleInfo moduleInfo)
        {
            Assembly           assembly    = LoadAssembly(moduleInfo);
            IModuleBootstraper bootstraper = CreateBootstraper(assembly);

            ExecuteOnLoad(bootstraper);
            RegisterModule(moduleInfo, bootstraper);
        }
Esempio n. 2
0
 private void ExecuteOnLoad(IModuleBootstraper bootstraper)
 {
     using (var waitHandle = new AutoResetEvent(false))
     {
         Action @delegate = () =>
         {
             bootstraper.OnLoad();
             waitHandle.Set();
         };
         _guiThreadProvider.RunInGui(@delegate);
         waitHandle.WaitOne();
     }
 }
Esempio n. 3
0
 private void RegisterModule(ModuleInfo moduleInfo, IModuleBootstraper bootstraper)
 {
     _loadedModules.Add(bootstraper);
     _loadedModuleInfos.Add(moduleInfo);
 }
Esempio n. 4
0
 private void ExecuteOnLoad(IModuleBootstraper bootstraper)
 {
     using (var waitHandle = new AutoResetEvent(false))
     {
         Action @delegate = () =>
                                {
                                    bootstraper.OnLoad();
                                    waitHandle.Set();
                                };
         _guiThreadProvider.RunInGui(@delegate);
         waitHandle.WaitOne();
     }
 }
Esempio n. 5
0
 private void RegisterModule(ModuleInfo moduleInfo, IModuleBootstraper bootstraper)
 {
     _loadedModules.Add(bootstraper);
     _loadedModuleInfos.Add(moduleInfo);
 }