Skip to content

Commit

Permalink
Merge pull request #2968 from JeffreySu/Developer-AI-Copilot
Browse files Browse the repository at this point in the history
Developer ai copilot
  • Loading branch information
JeffreySu authored Dec 4, 2023
2 parents 4e647d9 + f09c62c commit b02d16a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public async Task<ActionResult> Post(PostModel postModel)
//测试时可开启此记录,帮助跟踪数据,使用前请确保App_Data文件夹存在,且有读写权限。
messageHandler.SaveRequestMessageLog();//记录 Request 日志(可选)

messageHandler.Execute();//执行微信处理过程(关键)
await messageHandler.ExecuteAsync(new CancellationToken());//执行微信处理过程(关键)

messageHandler.SaveResponseMessageLog();//记录 Response 日志(可选)

Expand Down Expand Up @@ -140,7 +140,7 @@ public async Task<ActionResult> Post(PostModel postModel)
/// <param name="postModel"></param>
/// <returns></returns>
[HttpPost]
public ActionResult MiniPost(PostModel postModel)
public async Task<ActionResult> MiniPost(PostModel postModel)
{
var maxRecordCount = 10;

Expand All @@ -151,7 +151,7 @@ public ActionResult MiniPost(PostModel postModel)
//自定义MessageHandler,对微信请求的详细判断操作都在这里面。
var messageHandler = new WorkCustomMessageHandler(Request.GetRequestMemoryStream(), postModel, maxRecordCount);
//执行微信处理过程
messageHandler.Execute();
await messageHandler.ExecuteAsync(new CancellationToken());
//自动返回加密后结果
return new FixWeixinBugWeixinResult(messageHandler);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- 此节点为 Sample 共享文件需要而添加,实际项目无需添加 -->
<ItemGroup Condition=" '$(Configuration)' != 'Release' ">
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.0" />
<!--<EmbeddedResource Include="..\..\Shared\Senparc.Weixin.Sample.Shared\wwwroot\**\*">
<Link>wwwroot\%(RecursiveDir)/%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand All @@ -25,9 +25,9 @@

<!--引用 Nuget 包-->
<ItemGroup>
<PackageReference Include="Senparc.Weixin.AspNet" Version="0.8.5.8" />
<PackageReference Include="Senparc.Weixin.Work" Version="3.15.14.7" />
<PackageReference Include="Senparc.Weixin.Work.Middleware" Version="0.8.5.7" />
<PackageReference Include="Senparc.Weixin.AspNet" Version="1.1.0" />
<PackageReference Include="Senparc.Weixin.Work" Version="3.18.1" />
<PackageReference Include="Senparc.Weixin.Work.Middleware" Version="1.1.0" />
</ItemGroup>

<!--直接引用源码-->
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -569,11 +569,11 @@ namespace Senparc.Weixin.MP.Sample.CustomerMessageHandler

## 👩‍🏫 如何使用 .NET Core 开发

> 当前分支包含了 .NET Framework 3.5 / 4.0 / 4.5 / 4.6.2 及 .NET Core 2.0 + 2.1 / .NET 5.0 + 6.0 的全版本代码(已经不更新的版本请查看 [release](https://github.com/JeffreySu/WeiXinMPSDK/releases) 快照)。<br>
> 当前分支包含了 .NET Framework 4.6.2+ 及 .NET 6.0/7.0/8.0 的全版本代码(已经不更新的版本请查看 [release](https://github.com/JeffreySu/WeiXinMPSDK/releases) 快照)。<br>
> 其中 .NET Framework 的 Demo 位于 `/src/Samples/All/net45-mvc` 目录下,<br>
> 【推荐】.NET 8.0(向下兼容 .NET 5.0、6.0、7.0 及 .NET Core 3.1 等更低版本) 的 Demo 位于 `/Samples/All/net8-mvc` 目录下。<br><br>
> 注意:<br>
> 1. 以上 Sample 中,`net7-mvc` 中的 Sample 直接引用了每个模块的源码,使用 `Release` 编译后可生成兼容不同版本的 Senaprc.Weixin SDK 库。<br>
> 1. 以上 Sample 中,`net8-mvc` 中的 Sample 直接引用了每个模块的源码,使用 `Release` 编译后可生成兼容不同版本的 Senaprc.Weixin SDK 库。<br>
> 2. 您也可以使用 .NET 6.0(向下兼容 .NET 5.0 及 .NET Core 3.1 等更低版本) 的 Demo 位于 `/Samples/All/net6-mvc` 目录下。
## ↕️ 使用Nuget安装到项目中
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,6 @@
<ProjectReference Include="..\..\Senparc.Weixin\Senparc.Weixin\Senparc.Weixin.net8.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>
</Project>

0 comments on commit b02d16a

Please sign in to comment.