45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
using System;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace JiShe.CollectBus.DynamicModule
|
||
{
|
||
/// <summary>
|
||
/// 提供动态管理ABP模块的功能
|
||
/// </summary>
|
||
public interface IDynamicModuleManager
|
||
{
|
||
/// <summary>
|
||
/// 获取已注册的模块类型
|
||
/// </summary>
|
||
/// <returns>当前应用程序中已注册的所有模块类型</returns>
|
||
Type[] GetRegisteredModuleTypes();
|
||
|
||
/// <summary>
|
||
/// 重新初始化指定的模块
|
||
/// </summary>
|
||
/// <param name="moduleType">要重新初始化的模块类型</param>
|
||
/// <returns>表示异步操作的任务</returns>
|
||
Task ReinitializeModuleAsync(Type moduleType);
|
||
|
||
/// <summary>
|
||
/// 卸载指定的模块
|
||
/// </summary>
|
||
/// <param name="moduleType">要卸载的模块类型</param>
|
||
/// <returns>表示异步操作的任务</returns>
|
||
Task UnloadModuleAsync(Type moduleType);
|
||
|
||
/// <summary>
|
||
/// 检查模块是否已加载
|
||
/// </summary>
|
||
/// <param name="moduleType">要检查的模块类型</param>
|
||
/// <returns>如果模块已加载,则为true;否则为false</returns>
|
||
bool IsModuleLoaded(Type moduleType);
|
||
|
||
/// <summary>
|
||
/// 根据模块名称获取模块类型
|
||
/// </summary>
|
||
/// <param name="moduleName">模块名称</param>
|
||
/// <returns>模块类型,如果找不到则为null</returns>
|
||
Type GetModuleTypeByName(string moduleName);
|
||
}
|
||
} |