部署 Apollo 之后,创建一个应用。 然后创建命名空间,选择 private 创建私有命名空间,选择 json 格式。 点击修改文本,填入 json 内容。 然后在 .NET 程序中引入包 <PackageReference Include="Com.Ctrip.F[......]继续阅读
部署 Apollo 之后,创建一个应用。 然后创建命名空间,选择 private 创建私有命名空间,选择 json 格式。 点击修改文本,填入 json 内容。 然后在 .NET 程序中引入包 <PackageReference Include="Com.Ctrip.F[......]继续阅读
Deploy Apollo and create an application. Then create a namespace, select private to create a private namespace, and choose the json format. Click mo[......] 继续阅读
首先是中间件,它决定了有时间显示哪些分组。 可以从 IApiDescriptionGroupCollectionProvider 服务中获取所有 API,然后通过 API 进行识别,检查是否有分组。 if (context.HostingEnvironment.I[......]继续阅读
First is the middleware, which determines which groups to display when there is time. All APIs can be obtained from the IApiDescriptionGroupCollectio[......] 继续阅读
在 .csproj 中使用了中文,导致 Jenkins CICD 的时候报错。 Microsoft.WinFX.targets(439,8): error : Invalid character in the given encoding. 原因在于 MSBuild 或者 dotnet publis[......] 继续阅读
Using Chinese characters in .csproj can cause errors during Jenkins CICD. Microsoft.WinFX.targets(439,8): error : Invalid character in the given encod[......]继续阅读
本文内容: JWT Token JWT Token颁发 JWT 签名验证 JWT 安全检验 Token 原理 打开 https://jwt.io/ ,进入后会看到默认页面有一段自动生成的 token,右边是关于这个 token 的信息。 可以看到默认有一段 token: e[......]继续阅读
本文内容: JWT Token JWT Token Issuance JWT Signature Verification JWT Security Check Token Principles Visit https://jwt.io/ to see a default page wi[......] 继续阅读
[TOC] Background Actually, I've been planning to write this article for a while, but I've been quite lazy, so I've kept delaying it. Recently, updates[......] 继续阅读
[TOC] 背景 其实,规划这篇文章有一段时间了,但是比较懒,所以一直拖着没写。 最近时总更新太快了,太卷了,所以借着 .NET 7 正式版发布,熬夜写完这篇文章,希望能够追上时总的一点距离。 本文主要介绍如何在 .NET 和 Go 语言中如何生成系统(Windows)动态链接库,又如何从代码中引用[......] 继续阅读
In projects using partial classes, such as Razor, Blazor, WPF, etc., the compilation will generate .g.cs files. However, if there are issues that prev[......] 继续阅读
在项目使用分部类,如 Razor、Blazor、Wpf 等项目中,编译会生成 .g.cs 文件,但是因为出现了问题,不能编译成功,查看源代码,找不出错误,只能开始输出 .g.cs ,查看文件进行检查。 <PropertyGroup> <EmitCompilerGenerat[......]继续阅读
using System.Resources; var assembly = typeof(Program).Assembly; ResourceManager resourceManager = new ResourceManager("update.Prope[......]继续阅读
using System.Resources; var assembly = typeof(Program).Assembly; ResourceManager resourceManager = new ResourceManager("update[......]继续阅读
项目发布参数: dotnet publish -c Release -r win-x64 -p:PublishProfile=FolderProfile --no-self-contained dotnet publish -c Release -r win-x64 -p:PublishProfi[......]继续阅读
Project publish parameters: dotnet publish -c Release -r win-x64 -p:PublishProfile=FolderProfile --no-self-contained dotnet publish -c Release -r wi[......]继续阅读
ASP.NET Core Response.Body is by default an HttpResponseStream, which is characterized by allowing writes only in append mode, and it cannot be read o[......] 继续阅读
ASP.NET Core Response.Body 默认是 HttpResponseStream,其主要特征是只能追加写,不能读取也不能修改。 所以最根本方法是替换 HttpResponseStream。 随便设置一个中间件,或者将 HttpContext 拿出来,定义变量 context。 替[......] 继续阅读
When not using ASP.NET Core and without the FluentValidation framework, model validation can be implemented through the native API. public class A {[......]继续阅读
在不使用 ASP.NET Core 时,也不使用 FluentValidation 这里框架,通过原生的 API 实现模型验证。 public class A { [EmailAddress] public string B { get; set; } } void Main() {[......]继续阅读