test: 进一步优化代码分析工具,扩大分析范围

This commit is contained in:
Fu Diwei
2021-06-09 17:11:25 +08:00
parent b47ac29c63
commit b61890ccf4
5 changed files with 276 additions and 104 deletions

View File

@@ -60,14 +60,22 @@ namespace SKIT.FlurlHttpClient.Wechat
{
if (type == null) throw new ArgumentNullException(nameof(type));
var lstProperty = type.GetProperties(BindingFlags.Public | BindingFlags.Instance).ToList();
static Type[] GetAllNestedTypes(Type type)
{
return type.GetNestedTypes()
.Where(e =>
e.IsClass &&
!e.IsAbstract &&
!e.IsInterface
)
.SelectMany(e =>
GetAllNestedTypes(e)
)
.ToArray();
}
type.GetNestedTypes()
.Where(e =>
e.IsClass &&
!e.IsAbstract &&
!e.IsInterface
)
var lstProperty = type.GetProperties(BindingFlags.Public | BindingFlags.Instance).ToList();
GetAllNestedTypes(type)
.ToList()
.ForEach(e =>
{