mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
- 为接口添加总体功能描述注释 - 为RegisterModule方法添加参数说明注释 - 为RegisterBuiltInModules方法添加容器和属性参数说明注释 - 为GetModules方法添加返回值说明注释 - 为InitializeAllAsync方法添加异步模式参数和返回值说明注释 - 为DestroyAllAsync方法添加返回值说明注释
42 lines
1.5 KiB
C#
42 lines
1.5 KiB
C#
using GFramework.Core.Abstractions.ioc;
|
||
using GFramework.Core.Abstractions.properties;
|
||
|
||
namespace GFramework.Core.Abstractions.architecture;
|
||
|
||
/// <summary>
|
||
/// 服务模块管理器接口,用于管理架构中的服务模块。
|
||
/// </summary>
|
||
public interface IServiceModuleManager
|
||
{
|
||
/// <summary>
|
||
/// 注册一个服务模块。
|
||
/// </summary>
|
||
/// <param name="module">要注册的服务模块实例。</param>
|
||
void RegisterModule(IServiceModule module);
|
||
|
||
/// <summary>
|
||
/// 注册内置的服务模块。
|
||
/// </summary>
|
||
/// <param name="container">IoC容器实例,用于解析依赖。</param>
|
||
/// <param name="properties">架构属性配置,用于模块初始化。</param>
|
||
void RegisterBuiltInModules(IIocContainer container, ArchitectureProperties properties);
|
||
|
||
/// <summary>
|
||
/// 获取所有已注册的服务模块。
|
||
/// </summary>
|
||
/// <returns>只读的服务模块列表。</returns>
|
||
IReadOnlyList<IServiceModule> GetModules();
|
||
|
||
/// <summary>
|
||
/// 异步初始化所有已注册的服务模块。
|
||
/// </summary>
|
||
/// <param name="asyncMode">是否以异步模式初始化模块。</param>
|
||
/// <returns>表示异步操作的任务。</returns>
|
||
Task InitializeAllAsync(bool asyncMode);
|
||
|
||
/// <summary>
|
||
/// 异步销毁所有已注册的服务模块。
|
||
/// </summary>
|
||
/// <returns>表示异步操作的值任务。</returns>
|
||
ValueTask DestroyAllAsync();
|
||
} |