Hikari.Common
8.0.11
dotnet add package Hikari.Common --version 8.0.11
NuGet\Install-Package Hikari.Common -Version 8.0.11
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="Hikari.Common" Version="8.0.11" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hikari.Common --version 8.0.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Hikari.Common, 8.0.11"
#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.
// Install Hikari.Common as a Cake Addin #addin nuget:?package=Hikari.Common&version=8.0.11 // Install Hikari.Common as a Cake Tool #tool nuget:?package=Hikari.Common&version=8.0.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Hikari.Common
C# Public libraries, including .net standard
项目开发模式:日常代码积累+网络搜集
请注意:
一旦使用本开源项目以及引用了本项目或包含本项目代码的公司因为违反劳动法(包括但不限定非法裁员、超时用工、雇佣童工等)在任何法律诉讼中败诉的,项目作者有权利追讨本项目的使用费,或者直接不允许使用任何包含本项目的源代码!任何性质的外包公司
或996公司
需要使用本类库,请联系作者进行商业授权!其他企业或个人可随意使用不受限。
建议开发环境
操作系统:Windows 11 22000.120及以上版本 开发工具:VisualStudio2022 v17.0.0 Preview 2.1及以上版本 SDK:.Net 6.0及以上版本
安装程序包
.NET 6.0以上
PM> Install-Package Hikari.Common
特色功能示例代码
1.检验字符串是否是Email、手机号、URL、IP地址、身份证号等
bool isEmail="3444764617@qq.com".MatchEmail(); // 可在appsetting.json中添加EmailDomainWhiteList和EmailDomainBlockList配置邮箱域名黑白名单,逗号分隔,如"EmailDomainBlockList": "^\\w{1,5}@qq.com,^\\w{1,5}@163.com,^\\w{1,5}@gmail.com,^\\w{1,5}@outlook.com",
bool isInetAddress = "114.114.114.114".MatchInetAddress();
bool isUrl = "http://masuit.com".MatchUrl();
bool isPhoneNumber = "15205201520".MatchPhoneNumber();
bool isIdentifyCard = "312000199502230660".MatchIdentifyCard();// 校验中国大陆身份证号
bool isCNPatentNumber = "200410018477.9".MatchCNPatentNumber(); // 校验中国专利申请号或专利号,是否带校验位,校验位前是否带“.”,都可以校验,待校验的号码前不要带CN、ZL字样的前缀
2.硬件监测(仅支持Windows)
float load = SystemInfo.CpuLoad;// 获取CPU占用率
long physicalMemory = SystemInfo.PhysicalMemory;// 获取物理内存总数
long memoryAvailable = SystemInfo.MemoryAvailable;// 获取物理内存可用率
double freePhysicalMemory = SystemInfo.GetFreePhysicalMemory();// 获取可用物理内存
Dictionary<string, string> diskFree = SystemInfo.DiskFree();// 获取磁盘每个分区可用空间
Dictionary<string, string> diskTotalSpace = SystemInfo.DiskTotalSpace();// 获取磁盘每个分区总大小
Dictionary<string, double> diskUsage = SystemInfo.DiskUsage();// 获取磁盘每个分区使用率
double temperature = SystemInfo.GetCPUTemperature();// 获取CPU温度
int cpuCount = SystemInfo.GetCpuCount();// 获取CPU核心数
IList<string> ipAddress = SystemInfo.GetIPAddress();// 获取本机所有IP地址
string localUsedIp = SystemInfo.GetLocalUsedIP();// 获取本机当前正在使用的IP地址
IList<string> macAddress = SystemInfo.GetMacAddress();// 获取本机所有网卡mac地址
string osVersion = SystemInfo.GetOsVersion();// 获取操作系统版本
RamInfo ramInfo = SystemInfo.GetRamInfo();// 获取内存信息
var cpuSN=SystemInfo.GetCpuInfo()[0].SerialNumber; // CPU序列号
var driveSN=SystemInfo.GetDiskInfo()[0].SerialNumber; // 硬盘序列号
代码包含
DateTime扩展类 DateTime帮助类
License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Backport.System.Threading.Lock (>= 2.0.7)
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Hikari.Common:
Package | Downloads |
---|---|
Hikari.UniCloud.Sdk
UniCloud操作类 |
|
Hikari.WeChatCloud.Sdk
微信云数据库操作类 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
8.0.11 | 66 | 12/23/2024 | |
8.0.10 | 98 | 11/12/2024 | |
8.0.9 | 93 | 10/16/2024 | |
8.0.8 | 101 | 10/9/2024 | |
8.0.7 | 163 | 3/11/2024 | |
8.0.6 | 161 | 2/1/2024 | |
8.0.5 | 110 | 1/31/2024 | |
8.0.0.4 | 123 | 1/31/2024 | |
8.0.0.3 | 106 | 1/30/2024 | |
8.0.0.2 | 197 | 1/5/2024 | |
8.0.0.1 | 194 | 11/29/2023 | |
8.0.0 | 130 | 11/15/2023 | |
7.0.2.3 | 166 | 10/26/2023 | |
7.0.2.2 | 157 | 10/26/2023 | |
7.0.2.1 | 148 | 10/26/2023 | |
7.0.2 | 165 | 8/16/2023 | |
7.0.1.4 | 167 | 8/1/2023 | |
7.0.1.3 | 175 | 7/28/2023 | |
7.0.1.2 | 166 | 7/19/2023 | |
7.0.1.1 | 319 | 2/23/2023 | |
7.0.1 | 362 | 11/21/2022 | |
7.0.0 | 351 | 11/9/2022 | |
6.0.4 | 446 | 7/18/2022 | |
6.0.3.9 | 430 | 5/27/2022 | |
6.0.3.8 | 451 | 4/22/2022 | |
6.0.3.7 | 154 | 4/13/2022 | |
6.0.3.6 | 140 | 4/11/2022 | |
6.0.3.5 | 136 | 3/31/2022 | |
6.0.3.4 | 463 | 1/26/2022 | |
6.0.3.3 | 463 | 1/11/2022 | |
6.0.3.2 | 282 | 12/29/2021 | |
6.0.3.1 | 327 | 12/29/2021 | |
6.0.3 | 281 | 12/24/2021 | |
6.0.2.4 | 374 | 11/9/2021 | |
6.0.0-rc.2.2.4 | 186 | 10/18/2021 | |
6.0.0-rc.2.2.3 | 142 | 10/14/2021 | |
6.0.0-rc.1.2.2 | 154 | 10/12/2021 | |
6.0.0-rc.1.2.1 | 180 | 9/23/2021 | |
6.0.0-rc.1.2.0 | 198 | 9/16/2021 | |
6.0.0-rc.1.1.0 | 210 | 9/16/2021 | |
6.0.0-preview.4.3.0 | 195 | 6/23/2021 | |
6.0.0-preview.4.1.0 | 191 | 6/9/2021 | |
6.0.0-preview.4.0.0 | 211 | 6/4/2021 | |
6.0.0-preview.3.1.1 | 162 | 5/25/2021 | |
6.0.0-preview.3.1.0 | 160 | 5/20/2021 |
修复了一些错误
いくつかのバグを修正しました
Fixed some bugs