mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-23 03:04:29 +08:00
- 移除专用的RegisterMediator方法,替换为ExecuteServicesHook通用服务配置方法 - 从架构配置中移除Mediator特定配置选项,改为通用服务配置委托 - 在架构基类中添加Configurator属性支持,允许子类提供自定义服务配置 - 更新测试代码适配新的服务配置方式,通过ExecuteServicesHook注册Mediator - 移除过时的测试组件和相关验证逻辑 - 删除Mediator.SourceGenerator包引用,保留运行时依赖 - 添加WaitUntilReadyAsync方法的详细文档注释
35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using GFramework.Core.Abstractions.architecture;
|
||
using GFramework.Core.Abstractions.logging;
|
||
using GFramework.Core.Abstractions.properties;
|
||
using GFramework.Core.logging;
|
||
|
||
namespace GFramework.Core.architecture;
|
||
|
||
/// <summary>
|
||
/// 默认架构配置类,实现IArchitectureConfiguration接口
|
||
/// 提供日志工厂、日志级别和架构选项的默认配置
|
||
/// </summary>
|
||
public sealed class ArchitectureConfiguration : IArchitectureConfiguration
|
||
{
|
||
/// <summary>
|
||
/// 获取或设置日志选项
|
||
/// 默认配置为Info级别日志,使用控制台日志工厂提供程序
|
||
/// </summary>
|
||
public LoggerProperties LoggerProperties { get; set; } = new()
|
||
{
|
||
LoggerFactoryProvider = new ConsoleLoggerFactoryProvider
|
||
{
|
||
MinLevel = LogLevel.Info
|
||
}
|
||
};
|
||
|
||
/// <summary>
|
||
/// 获取或设置架构选项
|
||
/// 默认创建新的ArchitectureOptions实例
|
||
/// </summary>
|
||
public ArchitectureProperties ArchitectureProperties { get; set; } = new()
|
||
{
|
||
AllowLateRegistration = false,
|
||
StrictPhaseValidation = true
|
||
};
|
||
} |