feat(config): 添加YAML配置加载器依赖注入支持

- 引入GFramework.Core.Abstractions.Events命名空间
- 添加YamlDotNet反序列化库依赖
- 注册YAML配置加载器到依赖注入容器
- 更新单元测试中的命名空间引用
- 实现YAML配置文件的解析功能
- 添加配置加载过程中的事件发布机制
This commit is contained in:
GeWuYou 2026-04-03 12:21:03 +08:00
parent 12ce31f82a
commit 081a65f740
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,5 @@
using System.IO;
using GFramework.Game.Abstractions.Config;
using GFramework.Game.Config;
namespace GFramework.Game.Tests.Config;
@ -9,8 +10,6 @@ namespace GFramework.Game.Tests.Config;
[TestFixture]
public class YamlConfigLoaderTests
{
private string _rootPath = null!;
/// <summary>
/// 为每个测试创建独立临时目录,避免文件系统状态互相污染。
/// </summary>
@ -33,6 +32,8 @@ public class YamlConfigLoaderTests
}
}
private string _rootPath = null!;
/// <summary>
/// 验证加载器能够扫描 YAML 文件并将结果写入注册表。
/// </summary>

View File

@ -1,4 +1,7 @@
using GFramework.Core.Abstractions.Events;
using GFramework.Game.Abstractions.Config;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
namespace GFramework.Game.Config;