主题
其他类库
一、HTTP / 网络请求
Flurl
地址:https://github.com/tmenier/Flurl
特点:流畅式 HTTP 调用,链式 API,简洁好用。
RestSharp
地址:https://github.com/restsharp/RestSharp
特点:老牌轻量 HTTP 客户端,API 请求神器。
HttpClientFactory
地址:https://github.com/dotnet/extensions
特点:ASP.NET Core 官方 HTTP 工厂,管理请求池、防套接字泄漏。
二、对象映射
AutoMapper
地址:https://github.com/AutoMapper/AutoMapper
特点:最流行对象映射库,DTO 转换必备。
Mapster
地址:https://github.com/MapsterMapper/Mapster
特点:高性能替代 AutoMapper,速度更快、内存更低。
三、日志框架
Serilog
地址:https://github.com/serilog/serilog
特点:结构化日志,支持文件、控制台、ES、数据库等多输出。
NLog
地址:https://github.com/NLog/NLog
特点:老牌稳定日志框架,配置简单、功能强。
Log4Net
地址:https://github.com/apache/logging-log4net
特点:经典日志组件,企业项目常用。
四、定时任务
Hangfire
地址:https://github.com/HangfireIO/Hangfire
特点:开箱即用后台任务,支持 Cron、延迟执行、持久化。
Quartz.NET
地址:https://github.com/quartznet/quartznet
特点:企业级定时调度,分布式、高可用。
Coravel
地址:https://github.com/jamesmh/coravel
特点:轻量定时任务,无需数据库,极简集成。
五、接口文档
NSwag
地址:https://github.com/RicoSuter/NSwag
特点:适用于 .NET、ASP.NET Core 和 TypeScript 的 Swagger/OpenAPI 工具链。
Scalar
地址:https://www.cnblogs.com/netry/p/18543378/scalar-an-alternative-to-swagger-in-dotnet-9
特点:提供现代化的 REST API 客户端、精美的 API 文档和一流的 OpenAPI/Swagger 支持。
六、文档解析
Markdig
地址:https://gitee.com/winsome_boy/markdig.git
特点:快速、强大、符合 CommonMark 标准、可扩展的 .NET Markdown 处理器。
教程:https://mp.weixin.qq.com/s/xGyzfUoGvgPX624PUoUKIw
七、图像处理
SkiaSharp
地址:https://www.nuget.org/packages/SkiaSharp
特点:基于 Google 的 Skia 图形库。
ImageSharp
地址:https://github.com/SixLabors/ImageSharp
特点:跨平台高性能图片处理,裁剪、压缩、水印、格式转换。
八、控制台工具
Spectre.Console
地址:https://spectreconsole.net/
特点:提供了一种简单但强大的方式来创建美观和交互式的控制台应用程序。
教程:https://mp.weixin.qq.com/s/FBDJKIOVR6swXBAYUwd7cg
ShellProgressBar
地址:https://github.com/Mpdreamz/shellprogressbar
特点:支持 .NET Core,用于可视化长时间运行的命令行任务。
教程:https://mp.weixin.qq.com/s/dY-4svHo5yJ03EDs0ZWGtg
九、格式化工具
Humanizer
地址:https://mp.weixin.qq.com/s/du1Z9gwotPUufAkSbAyxOg
特点:开源类库,用于简化日期、时间、数字、货币等格式的本地化和人性化表达。
NodaTime
地址:https://mp.weixin.qq.com/s/gnjn03IK3xu-K8VHi6kBng
特点:提供比 .NET 自带 DateTime 更丰富和可靠的日期时间操作功能。
十、网络通信
SSH.NET
地址:https://mp.weixin.qq.com/s/du1Z9gwotPUufAkSbAyxOg
特点:针对 .NET 平台优化的 SSH-2 库,支持 SSH 命令、SFTP/SCP 文件传输、端口转发、交互式终端。
十一、消息传递
MediatR
地址:https://mp.weixin.qq.com/s/xzpDoIo2R8j19Zk3P3EnRA
特点:轻量级中介者模式库,实现 CQRS 模式和面向消息的架构。
十二、硬件信息
Hardware.Info
地址:https://mp.weixin.qq.com/s/ktQNX7_aEaoHOi2HGO8DNA
特点:基于 .NET Standard 2.0 的跨平台硬件信息查询库,支持 Windows、Linux、macOS。
十三、分布式锁
DistributedLock
地址:https://mp.weixin.qq.com/s/X2vB77nB9lJFGKpqX1FGng
特点:基于各种底层技术提供强大且易于使用的分布式互斥体、读写器锁和信号量。
十四、高性能 / 并发
ChannelDemo
地址:https://github.com/dotnet/corefx
特点:.NET 官方高性能通道。
MediatR
地址:https://github.com/jbogard/MediatR
特点:进程内消息队列,解耦神器。
Polly
地址:https://github.com/App-vNext/Polly
特点:熔断、重试、降级、限流。
十五、验证 / 配置
FluentValidation
地址:https://github.com/FluentValidation/FluentValidation
特点:流畅式模型验证。