HMENetCore 6.0.51
dotnet add package HMENetCore --version 6.0.51
NuGet\Install-Package HMENetCore -Version 6.0.51
<PackageReference Include="HMENetCore" Version="6.0.51" />
<PackageVersion Include="HMENetCore" Version="6.0.51" />
<PackageReference Include="HMENetCore" />
paket add HMENetCore --version 6.0.51
#r "nuget: HMENetCore, 6.0.51"
#:package HMENetCore@6.0.51
#addin nuget:?package=HMENetCore&version=6.0.51
#tool nuget:?package=HMENetCore&version=6.0.51
HMENetCore
简介
HMENetCore 是基于 .NET Core 的基础功能封装库,提供了常用的工具类、扩展方法及通用模型,目的是为了简化项目中的开发流程并提高代码复用性。
功能特性
1. 依赖自动注册(Autoregister)
功能:简化依赖注入(DI)容器的服务注册流程
核心类:
- NetCoreDIModuleRegistry.cs:自动扫描并注册程序集中的服务
 - ServiceLocator.cs:服务定位器模式的实现(建议谨慎使用)
 - UseDIAattribute.cs:通过特性标记需要注入的服务
 
2. 基础模型
功能:定义通用的请求/响应模型,规范接口交互
核心类:
- DBModelBase.cs:数据库实体的基类
 - PageModel.cs:分页请求/响应模型
 - RequestModel.cs/ResponseModel.cs:通用请求/响应封装
 - TableAttribute.cs:表列属性定义(用于动态表结构)
 
3. 缓存工具(Cached)
功能:简化缓存操作(如内存缓存、分布式缓存)
核心类:
- RunCacheHelper.cs:缓存读写封装,支持过期时间、缓存键生成等
 
4. 通用工具类
功能:提供跨领域工具和方法,覆盖常见开发需求
核心类:
- 异步工具:AsyncHelper.cs(异步锁、任务调度)
 - 计算机工具:ComputerHelper.cs(获取硬件信息)
 - 加密解密:EncryptionHelper.cs(MD5、AES、RSA、HmacSHA256、SHA等)
 - HTTP工具:HttpClientCore.cs(HTTP请求封装)
 - Lambda表达式:LambdaHelper.cs(动态生成表达式树)
 - 扩展方法:PredicateExtensions.cs(Linq扩展)
 - 反射工具:ReflectionHelp.cs(动态调用、属性操作)
 - 任务队列:TaskQeuryHelper.cs(任务调度和队列管理)
 - URL工具:UrlsHelper.cs(URL解析和生成)
 - 验证码验证:ImageValidateCode.cs(验证码生成和验证)
 - XML/ZIP工具:XMLHelper.cs/ZipHelper.cs
 
5. 类型转换器
功能:处理数据格式转换和类型映射
核心类:
- 特性操作:AttributeHelper.cs(特性值读取)
 - 深度拷贝:AutoCopyHelper.cs(对象深度拷贝)
 - 布尔/字节工具:BoolHelper.cs/ByteHelper.cs
 - 数据表转换:DataTableHelper.cs(DataTable 与对象转换)
 - 日期时间:DateTimeHelper.cs(时间格式化、时区转换)
 - 字典工具:DictionaryHelper.cs(字典扩展操作)
 - 枚举工具:EnumHelper.cs(枚举描述、名称转换)
 - JSON/对象工具:JsonHelper.cs/ObjectHelper.cs
 - 随机数:RandomHelper.cs(生成随机字符串和数字)
 - 序列化:SerializeHelper.cs(JSON/XML 序列化)
 - 流工具:StreamHelper.cs(流读写封装)
 - 字符串工具:StringHelper.cs(字符串校验和、格式化)
 - 数字工具:DecimalHelper.cs/IntHelper.cs/LongHelper.cs
 - 类型工具:TypesHelper.cs(类型判断和转换)
 - 验证工具:VerifiyHelper.cs(数据验证逻辑)
 
6. 基础日志工具
- LogHelper.cs:通用日志封装
 
运行环境
- 跨平台支持: Supports .NET Standard 2.1, .NET 6, .NET 8, and .NET 9.
 
安装
dotnet add package HMENetCore
                                | Product | Versions Compatible and additional computed target framework versions. | 
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. | 
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. | 
| .NET Standard | netstandard2.1 is compatible. | 
| MonoAndroid | monoandroid was computed. | 
| MonoMac | monomac was computed. | 
| MonoTouch | monotouch was computed. | 
| Tizen | tizen60 was computed. | 
| Xamarin.iOS | xamarinios was computed. | 
| Xamarin.Mac | xamarinmac was computed. | 
| Xamarin.TVOS | xamarintvos was computed. | 
| Xamarin.WatchOS | xamarinwatchos was computed. | 
- 
                                                    
.NETStandard 2.1
- Microsoft.AspNet.WebApi.Client (>= 6.0.0)
 - Microsoft.CSharp (>= 4.7.0)
 - Microsoft.Extensions.DependencyInjection (>= 9.0.10)
 - Newtonsoft.Json (>= 13.0.4)
 - SharpZipLib (>= 1.4.2)
 - System.ComponentModel.Annotations (>= 5.0.0)
 - System.Drawing.Common (>= 9.0.10)
 - System.Runtime.Caching (>= 9.0.10)
 - System.Text.Json (>= 9.0.10)
 
 - 
                                                    
net6.0
- Microsoft.AspNet.WebApi.Client (>= 6.0.0)
 - Microsoft.Extensions.DependencyInjection (>= 8.0.1)
 - Newtonsoft.Json (>= 13.0.4)
 - SharpZipLib (>= 1.4.2)
 - SixLabors.ImageSharp.Drawing (>= 2.1.7)
 - System.Runtime.Caching (>= 8.0.1)
 
 - 
                                                    
net8.0
- Microsoft.AspNet.WebApi.Client (>= 6.0.0)
 - Microsoft.Extensions.DependencyInjection (>= 9.0.10)
 - Newtonsoft.Json (>= 13.0.4)
 - SharpZipLib (>= 1.4.2)
 - SixLabors.ImageSharp.Drawing (>= 2.1.7)
 - System.Runtime.Caching (>= 9.0.10)
 
 - 
                                                    
net9.0
- Microsoft.AspNet.WebApi.Client (>= 6.0.0)
 - Microsoft.Extensions.DependencyInjection (>= 9.0.10)
 - Newtonsoft.Json (>= 13.0.4)
 - SharpZipLib (>= 1.4.2)
 - SixLabors.ImageSharp.Drawing (>= 2.1.7)
 - System.Runtime.Caching (>= 9.0.10)
 
 
NuGet packages (8)
Showing the top 5 NuGet packages that depend on HMENetCore:
| Package | Downloads | 
|---|---|
| 
                                                        
                                                            HMENetCore.Extensions
                                                        
                                                         HMENetCore.Extensions for .net6 .net8 .net9  | 
                                                    |
| 
                                                        
                                                            HMENetCore.SqlSugar
                                                        
                                                         HMENetCore.SqlSugar for netstandard2.1 .net6 .net8 .net9. Supports multiple databases such as MySql, SQLServer, SQLite, Oracle, PostgreSQL, Dameng, MariaDB, Tidb, Odbc, Doris, and more.  | 
                                                    |
| 
                                                        
                                                            HMENetCore.MongoDB
                                                        
                                                         HMENetCore.MongoDB for netstandard2.1 .net6 .net8 .net9. MongoDB.Driver 3.0 only supports MongoDB database versions 4.0 and above  | 
                                                    |
| 
                                                        
                                                            HMENetCore.Redis
                                                        
                                                         HMENetCore.Redis for netstandard2.1 .net6 .net8 .net9  | 
                                                    |
| 
                                                        
                                                            HMENetCore.Elasticsearch
                                                        
                                                         HMENetCore.Elasticsearch for netstandard2.1 .net6 .net8 .net9,Only supports Elasticsearch 8.0 and above databases.  | 
                                                    
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | 
|---|---|---|
| 6.0.51 | 401 | 10/20/2025 | 
| 6.0.50 | 1,067 | 9/18/2025 | 
| 6.0.49 | 361 | 8/13/2025 | 
| 6.0.48 | 813 | 8/7/2025 | 
| 6.0.47 | 419 | 7/16/2025 | 
| 6.0.46 | 267 | 7/8/2025 | 
| 6.0.45 | 203 | 7/2/2025 | 
| 6.0.43 | 228 | 6/26/2025 | 
| 6.0.42 | 418 | 6/18/2025 | 
| 6.0.41 | 523 | 6/10/2025 | 
| 6.0.40 | 197 | 5/19/2025 | 
| 6.0.39 | 494 | 5/15/2025 | 
| 6.0.38 | 529 | 4/24/2025 | 
| 6.0.37 | 279 | 4/24/2025 | 
| 6.0.36 | 199 | 4/11/2025 | 
| 6.0.35 | 605 | 4/9/2025 | 
| 6.0.33 | 475 | 3/17/2025 | 
| 6.0.32 | 174 | 2/24/2025 | 
| 6.0.31 | 261 | 2/20/2025 | 
| 6.0.30 | 430 | 2/19/2025 | 
| 6.0.21 | 204 | 2/6/2025 | 
| 6.0.20 | 479 | 2/5/2025 | 
| 6.0.19 | 263 | 1/10/2025 | 
| 6.0.18 | 237 | 1/7/2025 | 
| 6.0.17 | 235 | 1/6/2025 | 
| 6.0.13 | 780 | 11/28/2024 | 
| 6.0.12 | 314 | 11/20/2024 | 
| 6.0.11 | 160 | 11/18/2024 | 
| 6.0.8 | 373 | 11/15/2024 | 
| 6.0.6 | 461 | 10/9/2024 | 
| 6.0.5 | 318 | 9/10/2024 | 
| 6.0.3 | 320 | 9/9/2024 | 
| 6.0.2 | 166 | 8/28/2024 | 
| 6.0.1 | 562 | 8/16/2024 |