/// <summary> /// 启动模块初始化。启动模块初始化需要依赖的对象: /// <see cref="IServiceLocator"/>、<see cref="IModuleInitializer"/>、<see cref="ILoggerFacade"/> /// </summary> protected override void InitializeModules() { try { serviceLocator = new ServiceLocator(); ModuleInitializer initializer = new Core.Modularity.ModuleInitializer(serviceLocator, Logger); manager = new ModuleManager(initializer, ModuleCatalog, Logger); manager.LoadModuleCompleted += new EventHandler<LoadModuleCompletedEventArgs>(manager_LoadModuleCompleted); } catch (Exception ex) { if (ex.Message.Contains("IModuleCatalog")) { throw new InvalidOperationException(Resources.NullModuleCatalogException); } throw; } if (manager != null) manager.Run(); }
/// <summary> /// 启动模块初始化。启动模块初始化需要依赖的对象: /// <see cref="IServiceLocator"/>、<see cref="IModuleInitializer"/>、<see cref="ILoggerFacade"/> /// </summary> protected override void InitializeModules() { try { serviceLocator = new ServiceLocator(); ModuleInitializer initializer = new Core.Modularity.ModuleInitializer(serviceLocator, Logger); manager = new ModuleManager(initializer, ModuleCatalog, Logger); manager.LoadModuleCompleted += new EventHandler <LoadModuleCompletedEventArgs>(manager_LoadModuleCompleted); } catch (Exception ex) { if (ex.Message.Contains("IModuleCatalog")) { throw new InvalidOperationException(Resources.NullModuleCatalogException); } throw; } if (manager != null) { manager.Run(); } }