/// <summary> /// 获取内置模块 /// </summary> /// <param name="moduleName">内置模块名称</param> /// <returns>内置模块对象</returns> public InternalModuleBase GetInternalModule(HTFrameworkModule moduleName) { if (moduleName == HTFrameworkModule.Main) { return(Current); } if (_internalModules.ContainsKey(moduleName)) { return(_internalModules[moduleName]); } else { throw new HTFrameworkException(HTFrameworkModule.Main, "获取内置模块失败:不存在名为 " + moduleName.ToString() + " 的内置模块!"); } }
/// <summary> /// HTFramework框架异常 /// </summary> /// <param name="module">异常发起的模块</param> /// <param name="message">异常信息</param> public HTFrameworkException(HTFrameworkModule module, string message) : base("[" + module.ToString() + "]" + message) { Module = module; }