mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
refactor(config): 优化架构配置集成测试中的警告处理
- 在初始化方法中添加了针对GF_ContextRegistration_003警告的禁用指令 - 通过#pragma warning disable和#pragma warning restore临时禁用了特定警告 - 保持了原有的配置注册表获取和怪物表格数据读取逻辑 - 确保了测试代码的编译清洁性同时维持功能完整性
This commit is contained in:
parent
3be34156cf
commit
0104537615
@ -325,8 +325,8 @@ public class ArchitectureConfigIntegrationTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建一个使用配置模块的模块实例。
|
||||
/// </summary>
|
||||
/// 创建一个使用配置模块的模块实例。
|
||||
/// </summary>
|
||||
/// <param name="configRoot">测试配置根目录。</param>
|
||||
/// <returns>已配置的模块实例。</returns>
|
||||
private static GameConfigModule CreateModule(string configRoot)
|
||||
@ -529,7 +529,9 @@ public class ArchitectureConfigIntegrationTests
|
||||
/// </summary>
|
||||
protected override void OnInit()
|
||||
{
|
||||
#pragma warning disable GF_ContextRegistration_003
|
||||
var registry = this.GetUtility<IConfigRegistry>();
|
||||
#pragma warning restore GF_ContextRegistration_003
|
||||
var monsterTable = registry.GetMonsterTable();
|
||||
|
||||
ObservedMonsterName = monsterTable.Get(1).Name;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user