/// <summary>
        /// Initializes the ABP system.
        /// </summary>
        public virtual void Initialize()
        {
            ResolveLogger();

            try
            {
                RegisterBootstrapper();

                //将配置项的注入加入到容器中
                IocManager.IocContainer.Install(new AbpCoreInstaller());

                IocManager.Resolve <AbpPlugInManager>().PlugInSources.AddRange(PlugInSources);
                IocManager.Resolve <AbpStartupConfiguration>().Initialize();

                _moduleManager = IocManager.Resolve <AbpModuleManager>();

                //在这里执行模块管理的 Initialize,里面实现的内容主要是加载所有的模块
                _moduleManager.Initialize(StartupModule);

                //在这里执行除模块管理器本身的所有的模块的 PreInitialize,Initialize,PostInitialize
                _moduleManager.StartModules();
            }
            catch (Exception ex)
            {
                _logger.Fatal(ex.ToString(), ex);
                throw;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes the ABP system.
        /// </summary>
        public virtual void Initialize()
        {
            ResolveLogger();

            try
            {
                RegisterBootstrapper();
                IocManager.IocContainer.Install(new AbpCoreInstaller());

                IocManager.Resolve <AbpPlugInManager>().PlugInSources.AddRange(PlugInSources);
                IocManager.Resolve <AbpStartupConfiguration>().Initialize();

                _moduleManager = IocManager.Resolve <AbpModuleManager>();
                _moduleManager.Initialize(StartupModule);
                _moduleManager.StartModules();
            }
            catch (Exception ex)
            {
                _logger.Fatal(ex.ToString(), ex);
                throw;
            }
        }
 public AbpApplicationManager(AbpModuleManager moduleManager, AbpModuleCollection modules)
 {
     _moduleManager = moduleManager;
     _modules       = modules;
 }