From 8c9fbb39b23b771d6d420498773b24d9e448570b Mon Sep 17 00:00:00 2001
From: GeWuYou <95328647+GeWuYou@users.noreply.github.com>
Date: Sun, 5 Apr 2026 13:34:50 +0800
Subject: [PATCH] =?UTF-8?q?feat(config):=20=E6=B7=BB=E5=8A=A0YAML=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE=E5=8A=A0=E8=BD=BD=E5=99=A8=E4=BE=9D=E8=B5=96=E6=B3=A8?=
=?UTF-8?q?=E5=85=A5=E6=94=AF=E6=8C=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 引入GFramework.Core.Abstractions.Events命名空间
- 添加YamlDotNet反序列化库相关引用
- 注册配置抽象层依赖到YAML配置加载器
- 更新测试文件中的命名空间引用以匹配新架构
---
GFramework.Game.Tests/Config/YamlConfigLoaderTests.cs | 5 +++--
GFramework.Game/Config/YamlConfigLoader.cs | 3 +++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/GFramework.Game.Tests/Config/YamlConfigLoaderTests.cs b/GFramework.Game.Tests/Config/YamlConfigLoaderTests.cs
index bd81952f..f2045ad3 100644
--- a/GFramework.Game.Tests/Config/YamlConfigLoaderTests.cs
+++ b/GFramework.Game.Tests/Config/YamlConfigLoaderTests.cs
@@ -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!;
-
///
/// 为每个测试创建独立临时目录,避免文件系统状态互相污染。
///
@@ -33,6 +32,8 @@ public class YamlConfigLoaderTests
}
}
+ private string _rootPath = null!;
+
///
/// 验证加载器能够扫描 YAML 文件并将结果写入注册表。
///
diff --git a/GFramework.Game/Config/YamlConfigLoader.cs b/GFramework.Game/Config/YamlConfigLoader.cs
index dd219ff2..6b15d3e5 100644
--- a/GFramework.Game/Config/YamlConfigLoader.cs
+++ b/GFramework.Game/Config/YamlConfigLoader.cs
@@ -1,5 +1,8 @@
using System.Diagnostics;
+using GFramework.Core.Abstractions.Events;
using GFramework.Game.Abstractions.Config;
+using YamlDotNet.Serialization;
+using YamlDotNet.Serialization.NamingConventions;
namespace GFramework.Game.Config;