随笔 - 216  文章 - 0 评论 - 2 阅读 - 24万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

11 2021 档案
Serilog 动态添加自定义属性
摘要:注:通过 using 的使用,可以在函数结束时自动移除属性 CallId。 代码示例: public bool UsbRegRead(uint regAddr, ref uint regData){ using (LogContext.PushProperty("CallId", Guid.NewG 阅读全文
posted @ 2021-11-11 14:58 青叶煮酒 阅读(514) 评论(0) 推荐(0) 编辑
C# 序列化与反序列化
摘要:1. 通过 JsonSerializer 类的 Serialize/Deserialize 函数,示例代码如下: using System; using System.Text.Json; using System.Text.Json.Serialization; namespace Console 阅读全文
posted @ 2021-11-02 10:06 青叶煮酒 阅读(116) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示