From 010453761566606c6c3248782c6a7fd780984127 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Fri, 17 Apr 2026 19:19:25 +0800 Subject: [PATCH] =?UTF-8?q?refactor(config):=20=E4=BC=98=E5=8C=96=E6=9E=B6?= =?UTF-8?q?=E6=9E=84=E9=85=8D=E7=BD=AE=E9=9B=86=E6=88=90=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E8=AD=A6=E5=91=8A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在初始化方法中添加了针对GF_ContextRegistration_003警告的禁用指令 - 通过#pragma warning disable和#pragma warning restore临时禁用了特定警告 - 保持了原有的配置注册表获取和怪物表格数据读取逻辑 - 确保了测试代码的编译清洁性同时维持功能完整性 --- .../Config/ArchitectureConfigIntegrationTests.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GFramework.Game.Tests/Config/ArchitectureConfigIntegrationTests.cs b/GFramework.Game.Tests/Config/ArchitectureConfigIntegrationTests.cs index f9a2492f..3020f9fd 100644 --- a/GFramework.Game.Tests/Config/ArchitectureConfigIntegrationTests.cs +++ b/GFramework.Game.Tests/Config/ArchitectureConfigIntegrationTests.cs @@ -325,8 +325,8 @@ public class ArchitectureConfigIntegrationTests } /// - /// 创建一个使用配置模块的模块实例。 - /// + /// 创建一个使用配置模块的模块实例。 + /// /// 测试配置根目录。 /// 已配置的模块实例。 private static GameConfigModule CreateModule(string configRoot) @@ -529,7 +529,9 @@ public class ArchitectureConfigIntegrationTests /// protected override void OnInit() { +#pragma warning disable GF_ContextRegistration_003 var registry = this.GetUtility(); +#pragma warning restore GF_ContextRegistration_003 var monsterTable = registry.GetMonsterTable(); ObservedMonsterName = monsterTable.Get(1).Name;