GFramework/GFramework.Core/architecture/ArchitectureConfiguration.cs
GeWuYou e755c5c7f8 refactor(core): 替换Mediator集成实现为通用服务配置机制
- 移除专用的RegisterMediator方法,替换为ExecuteServicesHook通用服务配置方法
- 从架构配置中移除Mediator特定配置选项,改为通用服务配置委托
- 在架构基类中添加Configurator属性支持,允许子类提供自定义服务配置
- 更新测试代码适配新的服务配置方式,通过ExecuteServicesHook注册Mediator
- 移除过时的测试组件和相关验证逻辑
- 删除Mediator.SourceGenerator包引用,保留运行时依赖
- 添加WaitUntilReadyAsync方法的详细文档注释
2026-02-14 19:41:21 +08:00

35 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.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
};
}