mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-21 02:58:06 +08:00
feat: 移除基础依赖库,升级公共组件,并适配 .NET 6.0
This commit is contained in:
@@ -85,9 +85,9 @@ namespace SKIT.FlurlHttpClient.Wechat
|
||||
|
||||
if (name.EndsWith("Request"))
|
||||
{
|
||||
if (!typeof(IWechatRequest).IsAssignableFrom(modelType))
|
||||
if (!typeof(ICommonRequest).IsAssignableFrom(modelType))
|
||||
{
|
||||
lstError.Add(new Exception($"`{name}` 类需实现自 `IWechatRequest`。"));
|
||||
lstError.Add(new Exception($"`{name}` 类需实现自 `ICommonRequest`。"));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -100,9 +100,9 @@ namespace SKIT.FlurlHttpClient.Wechat
|
||||
|
||||
if (name.EndsWith("Response"))
|
||||
{
|
||||
if (!typeof(IWechatResponse).IsAssignableFrom(modelType))
|
||||
if (!typeof(ICommonResponse).IsAssignableFrom(modelType))
|
||||
{
|
||||
lstError.Add(new Exception($"`{name}` 类需实现自 `IWechatResponse`。"));
|
||||
lstError.Add(new Exception($"`{name}` 类需实现自 `ICommonResponse`。"));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ namespace SKIT.FlurlHttpClient.Wechat
|
||||
.Where(e =>
|
||||
e.IsPublic &&
|
||||
e.IsStatic &&
|
||||
typeof(IWechatClient).IsAssignableFrom(e.GetParameters().FirstOrDefault().ParameterType)
|
||||
typeof(ICommonClient).IsAssignableFrom(e.GetParameters().FirstOrDefault().ParameterType)
|
||||
)
|
||||
.ToArray();
|
||||
|
||||
@@ -267,10 +267,10 @@ namespace SKIT.FlurlHttpClient.Wechat
|
||||
continue;
|
||||
}
|
||||
|
||||
// 第二个参数必为 IWechatRequest 子类
|
||||
if (!typeof(IWechatRequest).IsAssignableFrom(lstParamInfo[1].ParameterType))
|
||||
// 第二个参数必为 ICommonRequest 子类
|
||||
if (!typeof(ICommonRequest).IsAssignableFrom(lstParamInfo[1].ParameterType))
|
||||
{
|
||||
lstError.Add(new Exception($"`{extType.Name}.{methodInfo.Name}` 方法第 1 个入参需实现自 `IWechatRequest`。"));
|
||||
lstError.Add(new Exception($"`{extType.Name}.{methodInfo.Name}` 方法第 1 个入参需实现自 `ICommonRequest`。"));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user