Example #1
0
        /// <summary>
        /// Initializes the specified module.
        /// </summary>
        /// <param name="moduleInfo">The module to initialize</param>
        public void Initialize(ModuleInfo moduleInfo)
        {
            if (moduleInfo == null)
            {
                throw new ArgumentNullException("moduleInfo");
            }

            IRunableModule moduleInstance = null;

            try
            {
                moduleInstance = CreateModule(moduleInfo);
                moduleInstance.Initialize();
            }
            catch (Exception ex)
            {
                HandleModuleInitializationError(
                    moduleInfo,
                    moduleInstance != null ? moduleInstance.GetType().Assembly.FullName : null,
                    ex);
            }
        }
Example #2
0
 public void Register(IRunableModule module)
 {
     _modules.Add(module);
 }