Skip to content

Commit ac4f60b

Browse files
committed
refactor(Options): 移除调试信息打印代码
清理不再需要的调试信息打印代码,简化选项构建和提供逻辑
1 parent a474bc0 commit ac4f60b

2 files changed

Lines changed: 0 additions & 19 deletions

File tree

GameFrameX.Foundation.Options/OptionsBuilder.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,6 @@ public static TOptions Create<TOptions>(
119119
/// <returns>构建的配置选项对象</returns>
120120
public static TOptions CreateWithDebug<TOptions>(string[] args, bool skipValidation = false) where TOptions : class, new()
121121
{
122-
// 先打印调试信息
123-
OptionsDebugger.PrintStructuredArguments(args, typeof(TOptions));
124-
125122
// 创建配置选项
126123
var result = Create<TOptions>(args, skipValidation);
127124

GameFrameX.Foundation.Options/OptionsProvider.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,6 @@ private static bool ShouldEnableDebugOutput(bool? enableDebugOutput = null)
9393
var type = typeof(T);
9494
var shouldDebug = ShouldEnableDebugOutput(enableDebugOutput);
9595

96-
// 如果启用调试输出,先打印原始参数信息
97-
if (shouldDebug)
98-
{
99-
OptionsDebugger.PrintStructuredArguments(_args ?? Array.Empty<string>(), typeof(T));
100-
}
101-
10296
// 如果缓存中已存在,直接返回
10397
if (OptionsCache.TryGetValue(type, out var cachedOptions))
10498
{
@@ -185,16 +179,6 @@ public static void RemoveFromCache<T>() where T : class
185179
return GetOptions<T>(skipValidation, enableDebugOutput: false);
186180
}
187181

188-
/// <summary>
189-
/// 仅打印参数结构化信息,不进行解析
190-
/// </summary>
191-
/// <typeparam name="T">选项类型</typeparam>
192-
/// <param name="args">命令行参数</param>
193-
public static void PrintArgumentsInfo<T>(string[] args) where T : class, new()
194-
{
195-
OptionsDebugger.PrintStructuredArguments(args, typeof(T));
196-
}
197-
198182
/// <summary>
199183
/// 打印已解析的选项对象信息
200184
/// </summary>

0 commit comments

Comments
 (0)