mirror of
https://github.com/jackqqq123/luban_ui_internal.git
synced 2025-12-17 21:38:22 +08:00
feta: 新增知识库管理:
- Core新增Git项目管理,支持代理 - Knowledge新增知识库来源配置
This commit is contained in:
29
test_config.cs
Normal file
29
test_config.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using LubanHub.Core.Attributes;
|
||||
|
||||
// 简单的测试脚本来验证配置发现
|
||||
Console.WriteLine("检查程序集加载情况...");
|
||||
|
||||
var assemblies = AppDomain.CurrentDomain.GetAssemblies()
|
||||
.Where(a => !a.IsDynamic && a.GetName().Name?.StartsWith("LubanHub") == true)
|
||||
.ToList();
|
||||
|
||||
Console.WriteLine($"发现 {assemblies.Count} 个LubanHub程序集:");
|
||||
foreach (var assembly in assemblies)
|
||||
{
|
||||
Console.WriteLine($" - {assembly.GetName().Name}");
|
||||
|
||||
var configTypes = assembly.GetTypes()
|
||||
.Where(type => type.IsClass && !type.IsAbstract &&
|
||||
type.GetCustomAttribute<ConfigurationSectionAttribute>() != null)
|
||||
.ToList();
|
||||
|
||||
Console.WriteLine($" 配置类型数量: {configTypes.Count}");
|
||||
foreach (var configType in configTypes)
|
||||
{
|
||||
var attr = configType.GetCustomAttribute<ConfigurationSectionAttribute>();
|
||||
Console.WriteLine($" - {configType.Name}: {attr?.DisplayName}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user