当集合为 null 时,代码如下: List<int>? _a = null; List<int>? _b = null; var a = _a?.Any() == false;[......]继续阅读

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

When the collection is null, the code is as follows: List<int>? _a = null; List<int>? _b = null; var[......]继续阅读

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

[ThreadStatic] private static bool HasCreated = false; [ThreadStatic] private static int Value = 0; void Main() { Console.WriteLine(Thread.Curren[......]继续阅读

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

如下面代码: [ThreadStatic] private bool HasCreated = false; [ThreadStatic] private int Value = 0; void Main() { ThreadLocal<string> a = new Thre[......]继续阅读

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

Directory Structure: └─templates └─consolesync └─content ├─.template.config ├──template.json └─AAA.Web.API ### Template Directory 1. Create an empty[......]继续阅读

2022年7月21日 0条评论 350点热度 0人点赞 痴者工良 阅读全文

目录结构: └─templates └─consolesync └─content ├─.template.config ├──template.json └─AAA.Web.API 模板目录 1,随[......] 继续阅读

2022年7月21日 0条评论 3230点热度 0人点赞 痴者工良 阅读全文

Define the Converter: public class EnumStringConverter : JsonConverter<Enum> { public override bool CanConvert(Type objectType) { return obj[......]继续阅读

2022年7月18日 0条评论 3713点热度 4人点赞 痴者工良 阅读全文

定义转换器: public class EnumStringConverter : JsonConverter<Enum> { public override bool CanConvert(Type objectType) { return object[......]继续阅读

2022年7月18日 0条评论 3661点热度 4人点赞 痴者工良 阅读全文

public async Task ExecuteAsync(HttpContext context) { Context = context; Request = Context.Request;[......]继续阅读

2022年7月5日 0条评论 384点热度 2人点赞 痴者工良 阅读全文

public async Task ExecuteAsync(HttpContext context) { Context = context; Request = Context.Request;[......]继续阅读

2022年7月5日 0条评论 1455点热度 2人点赞 痴者工良 阅读全文

private static readonly Encoding UTF8NoBOM = new UTF8Encoding( encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true); [......] 继续阅读

2022年7月5日 0条评论 352点热度 0人点赞 痴者工良 阅读全文

private static readonly Encoding UTF8NoBOM = new UTF8Encoding( encoderShouldEmitUTF8Identifier: false, throwOnInvali[......]继续阅读

2022年7月5日 0条评论 2496点热度 0人点赞 痴者工良 阅读全文

第一种: private bool IsDefaultValue(T value) { Span<byte> valueBytes = MemoryMarshal.AsBytes<T>(new T []{ value }.AsSpan());[......]继续阅读

2022年4月3日 0条评论 3538点热度 2人点赞 痴者工良 阅读全文

第一种: private bool IsDefaultValue(T value) { Span<byte> valueBytes = MemoryMarshal.AsBytes<T>(new T []{ value }.AsSpan());[......]继续阅读

2022年4月3日 0条评论 3464点热度 2人点赞 痴者工良 阅读全文

using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Jobs; using BenchmarkDotNet.Running; public unsafe class Model { public int Id { get; set[......]继续阅读

2022年3月29日 1条评论 326点热度 1人点赞 痴者工良 阅读全文

using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Jobs; using BenchmarkDotNet.Running; public unsafe class Model { public int Id { get; set[......]继续阅读

2022年3月29日 1条评论 2965点热度 1人点赞 痴者工良 阅读全文

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

2022年1月24日 0条评论 2863点热度 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条评论 448点热度 2人点赞 痴者工良 阅读全文

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

2022年1月17日 0条评论 2873点热度 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条评论 408点热度 0人点赞 痴者工良 阅读全文
13456716