From bd7f147b15efd57c5f054e537e715486c53c25dc Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期五, 28 十一月 2025 17:08:34 +0800
Subject: [PATCH] 标准版
---
WebApi/Gs.Toolbox/ApiCore/Common/Mvc/CustomControllerFeatureProvider.cs | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/WebApi/Gs.Toolbox/ApiCore/Common/Mvc/CustomControllerFeatureProvider.cs b/WebApi/Gs.Toolbox/ApiCore/Common/Mvc/CustomControllerFeatureProvider.cs
index 2caec77..3ff4773 100644
--- a/WebApi/Gs.Toolbox/ApiCore/Common/Mvc/CustomControllerFeatureProvider.cs
+++ b/WebApi/Gs.Toolbox/ApiCore/Common/Mvc/CustomControllerFeatureProvider.cs
@@ -66,15 +66,25 @@
assembly.FullName.Contains("Swashbuckle"))
return;
//閫掑綊鑾峰彇controller
- var assTemp = Assembly.Load(assembly);
- assTemp.GetTypes().ToList().ForEach(type =>
+ try
{
- //濡傛灉瀹炵幇浜咺RomteService鍒欒涓烘槸涓�涓帶鍒跺櫒
- if (!IsController(type)) return;
- feature.Controllers.Add(type.GetTypeInfo());
- });
- var a = assTemp.GetReferencedAssemblies();
- AddController(feature, a);
+ var assTemp = Assembly.Load(assembly);
+ assTemp.GetTypes().ToList().ForEach(type =>
+ {
+ //濡傛灉瀹炵幇浜咺RomteService鍒欒涓烘槸涓�涓帶鍒跺櫒
+ if (!IsController(type)) return;
+ feature.Controllers.Add(type.GetTypeInfo());
+ });
+ var a = assTemp.GetReferencedAssemblies();
+ AddController(feature, a);
+ }
+ catch (Exception)
+ {
+
+
+ }
+
+
});
}
--
Gitblit v1.9.3