| | |
| | | assembly.FullName.Contains("Swashbuckle")) |
| | | return; |
| | | //递归获取controller |
| | | var assTemp = Assembly.Load(assembly); |
| | | assTemp.GetTypes().ToList().ForEach(type => |
| | | try |
| | | { |
| | | //如果实现了IRomteService则认为是一个控制器 |
| | | 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 => |
| | | { |
| | | //如果实现了IRomteService则认为是一个控制器 |
| | | if (!IsController(type)) return; |
| | | feature.Controllers.Add(type.GetTypeInfo()); |
| | | }); |
| | | var a = assTemp.GetReferencedAssemblies(); |
| | | AddController(feature, a); |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | }); |
| | | } |
| | | |