Ejemplo n.º 1
0
        ModuleEvents IExtensibilityManager.GetModuleEvents()
        {
            ModuleEvents moduleEvents = new ModuleEvents();

            EasyBlogModulesConfigurationElementCollection modules = _ConfigurationFactory.GetModules();

            if (modules != null)
            {
                foreach (EasyBlogModuleConfigurationElement module in modules)
                {
                    IEasyBlogModule moduleType = _Container.Resolve(Type.GetType(module.Type)) as IEasyBlogModule;
                    if (moduleType != null)
                    {
                        moduleType.Initialize(moduleEvents);
                    }
                }
            }

            _ModuleEvents = moduleEvents;

            return(moduleEvents);
        }
Ejemplo n.º 2
0
        ModuleEvents IExtensibilityManager.GetModuleEvents()
        {
            ModuleEvents moduleEvents = new ModuleEvents();

            EasyBlogConfigurationSection config = ConfigurationManager.GetSection("easyBlog")
                                                  as EasyBlogConfigurationSection;

            if (config != null)
            {
                foreach (EasyBlogModuleConfigurationElement module in config.Modules)
                {
                    IEasyBlogModule moduleType = Activator.CreateInstance(Type.GetType(module.Type))
                                                 as IEasyBlogModule;
                    if (moduleType != null)
                    {
                        moduleType.Initialize(moduleEvents);
                    }
                }
            }

            return(moduleEvents);
        }