HMENetCore 6.0.49

dotnet add package HMENetCore --version 6.0.49
                    
NuGet\Install-Package HMENetCore -Version 6.0.49
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HMENetCore" Version="6.0.49" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HMENetCore" Version="6.0.49" />
                    
Directory.Packages.props
<PackageReference Include="HMENetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HMENetCore --version 6.0.49
                    
#r "nuget: HMENetCore, 6.0.49"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package HMENetCore@6.0.49
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HMENetCore&version=6.0.49
                    
Install as a Cake Addin
#tool nuget:?package=HMENetCore&version=6.0.49
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on HMENetCore:

Package Downloads
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.Extensions

HMENetCore.Extensions for .net6 .net8 .net9

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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.0.49 45 8/13/2025
6.0.48 168 8/7/2025
6.0.47 198 7/16/2025
6.0.46 180 7/8/2025
6.0.45 152 7/2/2025
6.0.43 162 6/26/2025
6.0.42 264 6/18/2025
6.0.41 378 6/10/2025
6.0.40 156 5/19/2025
6.0.39 346 5/15/2025
6.0.38 343 4/24/2025
6.0.37 207 4/24/2025
6.0.36 161 4/11/2025
6.0.35 390 4/9/2025
6.0.33 307 3/17/2025
6.0.32 139 2/24/2025
6.0.31 189 2/20/2025
6.0.30 313 2/19/2025
6.0.21 152 2/6/2025
6.0.20 313 2/5/2025
6.0.19 186 1/10/2025
6.0.18 174 1/7/2025
6.0.17 181 1/6/2025
6.0.13 522 11/28/2024
6.0.12 228 11/20/2024
6.0.11 124 11/18/2024
6.0.8 259 11/15/2024
6.0.6 319 10/9/2024
6.0.5 240 9/10/2024
6.0.3 234 9/9/2024
6.0.2 128 8/28/2024
6.0.1 411 8/16/2024