mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-29 01:44:42 +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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<TargetFrameworks>netcoreapp3.1; net6.0</TargetFrameworks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\SKIT.FlurlHttpClient.Wechat\SKIT.FlurlHttpClient.Wechat.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SKIT.FlurlHttpClient.Common" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user