写什么呢 前段时间使用 C# 写了个项目,使用 Kubernetes API Server,获取信息以及监控 Kubernetes 资源,然后结合 Neting 做 API 网关。 体验地址 http://neting.whuanle.cn:30080/ 账号 admin,密码 admin123 [......] 继续阅读

2022年1月24日 0条评论 2568点热度 2人点赞 痴者工良 阅读全文

What to Write Not long ago, I wrote a project using C#, which utilizes the Kubernetes API Server to retrieve information and monitor Kubernetes resour[......] 继续阅读

2022年1月24日 0条评论 114点热度 2人点赞 痴者工良 阅读全文

关于 Neting 刚开始的时候是打算使用微软官方的 Yarp 库,实现一个 API 网关,后面发现坑比较多,弄起来比较麻烦,就放弃了。目前写完了查看 Kubernetes Service 信息、创建 Route 和 Cluster 和绑定 Kubernetes Service。简单来说,就是完成了[......] 继续阅读

2022年1月17日 0条评论 2623点热度 0人点赞 痴者工良 阅读全文

About Neting Initially, I planned to use Microsoft's official Yarp library to implement an API gateway, but later found it quite cumbersome and decide[......] 继续阅读

2022年1月17日 0条评论 104点热度 0人点赞 痴者工良 阅读全文

||其代码如下: /// <summary> /// 值类型和字符串互转 /// </summary> public class JsonStringToNumberConverter : JsonConverterFactory {[......]继续阅读

2021年11月3日 1条评论 3024点热度 0人点赞 痴者工良 阅读全文

/// <summary> /// Convert between value types and strings /// </summary> public class JsonStringToNumberConverter : JsonCo[......]继续阅读

2021年11月3日 1条评论 96点热度 0人点赞 痴者工良 阅读全文

下毒代码如下: void Main() { Value a = 0; if (a == 1 && a == 2 && a == 3) { Console.WriteLine("给代码下点毒"); return;[......]继续阅读

2021年9月25日 0条评论 2542点热度 0人点赞 痴者工良 阅读全文

The poisoned code is as follows: void Main() { Value a = 0; if (a == 1 && a == 2 && a == 3) { Console.WriteLine("毒代码");[......]继续阅读

2021年9月25日 0条评论 2572点热度 0人点赞 痴者工良 阅读全文

The code provided exports a DataTable to a .csv format. public static async Task SaveCSV(DataTable dt,string[] header, string fileName)[......]继续阅读

2021年8月23日 0条评论 2724点热度 0人点赞 痴者工良 阅读全文

代码所示,将 Table 导出为 .csv 格式的数据。 public static async Task SaveCSV(DataTable dt,string[] header, string fileName) { StringBuild[......]继续阅读

2021年8月23日 0条评论 2698点热度 0人点赞 痴者工良 阅读全文

继承 IActionResult: public class ResponseResult<TData> : IActionResult { /// <summary> /// 状态码 /// </summ[......]继续阅读

2021年8月21日 0条评论 4582点热度 0人点赞 痴者工良 阅读全文

Inheriting from IActionResult: public class ResponseResult<TData> : IActionResult { /// <summary> /// Status code[......]继续阅读

2021年8月21日 0条评论 4598点热度 0人点赞 痴者工良 阅读全文

There are readers suggesting to use app.UseExceptionHandler(); for global exception interception. https://learn.microsoft.com/en-us/aspnet/core/fundam[......] 继续阅读

2021年8月12日 2条评论 3449点热度 0人点赞 痴者工良 阅读全文

有读者回复推荐全局异常拦截使用 app.UseExceptionHandler();。 https://learn.microsoft.com/en-us/aspnet/core/fundamentals/error-handling?view=aspnetcore-9.0 跟本身的主要区别是请求到[......] 继续阅读

2021年8月12日 2条评论 3467点热度 0人点赞 痴者工良 阅读全文

Directly use the .NET CLR library for generation without relying on third-party frameworks. The code has been updated to the latest implementation, re[......] 继续阅读

2021年8月12日 0条评论 140点热度 0人点赞 痴者工良 阅读全文

直接使用 .NET 的 CLR 库生成,不依赖第三方框架。 已将代码修正为最新实现,去掉过时接口。 基于密码的密钥导出函数2(PBKDF2)让别人更难通过穷举法猜到你的帐户密码。 pbkdf2 加密是不可逆的,因此可以用来处理密码等,只能对比,不能还原。 比如说,每个用户设置一个加密密钥,每个用户使[......] 继续阅读

2021年8月12日 0条评论 3184点热度 0人点赞 痴者工良 阅读全文

When directly using the API to get a Claim, the correctness of the Token's key is not checked. var jwt = jwtSecurityTokenHandler.ReadJ[......]继续阅读

2021年8月12日 0条评论 106点热度 0人点赞 痴者工良 阅读全文

当直接使用 API 获取 Claim 时,是不会检查 Token 的密钥是否正确的。 var jwt = jwtSecurityTokenHandler.ReadJwtToken(token); 如果要同时检查 Token,则可以这样使用: [......]继续阅读

2021年8月12日 0条评论 2816点热度 0人点赞 痴者工良 阅读全文

Common JSON serialization configuration is as follows: // JSON serialization configuration private static readonly JsonSerializerOpti[......]继续阅读

2021年8月12日 0条评论 5017点热度 3人点赞 痴者工良 阅读全文

常用的 Json 序列化配置如下: // json 序列化配置 private static readonly JsonSerializerOptions JsonSetting = new JsonSerializerOptions() {[......]继续阅读

2021年8月12日 0条评论 5084点热度 3人点赞 痴者工良 阅读全文
1101112131428