refactor(config): 更新配置加载器依赖项

- 添加事件抽象依赖项到YAML配置加载器
- 添加YamlDotNet序列化库依赖项
- 为Godot平台配置文件访问添加别名引用
- 在测试文件中添加配置依赖项引用
This commit is contained in:
GeWuYou 2026-04-11 08:44:37 +08:00
parent 0f1319334e
commit 8c8373d844
3 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,8 @@
using System.Diagnostics; using System.Diagnostics;
using GFramework.Core.Abstractions.Events;
using GFramework.Game.Abstractions.Config; using GFramework.Game.Abstractions.Config;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
namespace GFramework.Game.Config; namespace GFramework.Game.Config;

View File

@ -1,6 +1,7 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using GFramework.Game.Abstractions.Config; using GFramework.Game.Abstractions.Config;
using GFramework.Game.Config;
using GFramework.Godot.Config; using GFramework.Godot.Config;
namespace GFramework.Godot.Tests.Config; namespace GFramework.Godot.Tests.Config;
@ -11,10 +12,6 @@ namespace GFramework.Godot.Tests.Config;
[TestFixture] [TestFixture]
public sealed class GodotYamlConfigLoaderTests public sealed class GodotYamlConfigLoaderTests
{ {
private string _resourceRoot = null!;
private string _testRoot = null!;
private string _userRoot = null!;
/// <summary> /// <summary>
/// 为每个测试准备独立的资源根目录与用户目录。 /// 为每个测试准备独立的资源根目录与用户目录。
/// </summary> /// </summary>
@ -43,6 +40,10 @@ public sealed class GodotYamlConfigLoaderTests
} }
} }
private string _resourceRoot = null!;
private string _testRoot = null!;
private string _userRoot = null!;
/// <summary> /// <summary>
/// 验证导出态会把注册过的 YAML 与 schema 文本同步到运行时缓存,再交给底层加载器。 /// 验证导出态会把注册过的 YAML 与 schema 文本同步到运行时缓存,再交给底层加载器。
/// </summary> /// </summary>

View File

@ -3,6 +3,7 @@ using GFramework.Core.Abstractions.Events;
using GFramework.Game.Abstractions.Config; using GFramework.Game.Abstractions.Config;
using GFramework.Game.Config; using GFramework.Game.Config;
using GFramework.Godot.Extensions; using GFramework.Godot.Extensions;
using FileAccess = Godot.FileAccess;
namespace GFramework.Godot.Config; namespace GFramework.Godot.Config;