diff --git a/GFramework.Game.Tests/Config/GeneratedConfigConsumerIntegrationTests.cs b/GFramework.Game.Tests/Config/GeneratedConfigConsumerIntegrationTests.cs index 9422aa75..4cdac7da 100644 --- a/GFramework.Game.Tests/Config/GeneratedConfigConsumerIntegrationTests.cs +++ b/GFramework.Game.Tests/Config/GeneratedConfigConsumerIntegrationTests.cs @@ -1,4 +1,5 @@ using System.IO; +using GFramework.Game.Abstractions.Config; using GFramework.Game.Config; using GFramework.Game.Config.Generated; @@ -11,8 +12,6 @@ namespace GFramework.Game.Tests.Config; [TestFixture] public class GeneratedConfigConsumerIntegrationTests { - private string _rootPath = null!; - /// /// 为每个端到端测试准备独立的配置根目录,避免编译期 schema 资产与运行时写入互相污染。 /// @@ -35,6 +34,8 @@ public class GeneratedConfigConsumerIntegrationTests } } + private string _rootPath = null!; + /// /// 验证生成器自动拾取消费者项目的 schema 后, /// 可以用生成的聚合注册辅助完成加载,并通过强类型表包装访问运行时数据与查询辅助。 diff --git a/GFramework.Game.Tests/Config/YamlConfigTextValidatorTests.cs b/GFramework.Game.Tests/Config/YamlConfigTextValidatorTests.cs index 02403d75..8c6eeb36 100644 --- a/GFramework.Game.Tests/Config/YamlConfigTextValidatorTests.cs +++ b/GFramework.Game.Tests/Config/YamlConfigTextValidatorTests.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 sealed class YamlConfigTextValidatorTests { - private string _rootPath = null!; - /// /// 为每个测试准备独立临时目录。 /// @@ -33,6 +32,8 @@ public sealed class YamlConfigTextValidatorTests } } + private string _rootPath = null!; + /// /// 验证合法 YAML 文本会通过公开校验入口。 /// diff --git a/GFramework.Game/Config/YamlConfigTextSerializer.cs b/GFramework.Game/Config/YamlConfigTextSerializer.cs index f8467220..12a26e31 100644 --- a/GFramework.Game/Config/YamlConfigTextSerializer.cs +++ b/GFramework.Game/Config/YamlConfigTextSerializer.cs @@ -1,3 +1,6 @@ +using YamlDotNet.Serialization; +using YamlDotNet.Serialization.NamingConventions; + namespace GFramework.Game.Config; ///