GeWuYou cb0d0682b0 refactor(core): 统一C#命名规范并添加校验脚本
- 将所有IoC相关命名空间从"IoC"重命名为"Ioc"
- 将所有CQRS相关命名空间从"CQRS"重命名为"Cqrs"
- 更新所有受影响的using语句以匹配新的命名空间
- 在CI工作流中添加C#命名规范校验步骤
- 修正了测试文件中的命名空间引用
2026-03-13 09:41:43 +08:00

34 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using GFramework.Core.Abstractions.Ioc;
using GFramework.Core.Abstractions.Lifecycle;
namespace GFramework.Core.Abstractions.Architecture;
/// <summary>
/// 服务模块接口,定义了服务模块的基本契约。
/// 所有服务模块必须实现此接口,以支持注册、初始化和异步销毁功能。
/// </summary>
public interface IServiceModule : IInitializable, IAsyncDestroyable
{
/// <summary>
/// 获取模块的唯一名称。
/// </summary>
string ModuleName { get; }
/// <summary>
/// 获取模块的优先级,数值越小优先级越高。
/// 用于控制模块的注册和初始化顺序。
/// </summary>
int Priority { get; }
/// <summary>
/// 获取模块的启用状态。
/// 返回 true 表示模块已启用false 表示模块被禁用。
/// </summary>
bool IsEnabled { get; }
/// <summary>
/// 注册模块提供的服务到依赖注入容器中。
/// </summary>
/// <param name="container">依赖注入容器实例,用于注册服务。</param>
void Register(IIocContainer container);
}