CodeM.Common.Tools
1.0.0
See the version list below for details.
dotnet add package CodeM.Common.Tools --version 1.0.0
NuGet\Install-Package CodeM.Common.Tools -Version 1.0.0
<PackageReference Include="CodeM.Common.Tools" Version="1.0.0" />
paket add CodeM.Common.Tools --version 1.0.0
#r "nuget: CodeM.Common.Tools, 1.0.0"
// Install CodeM.Common.Tools as a Cake Addin #addin nuget:?package=CodeM.Common.Tools&version=1.0.0 // Install CodeM.Common.Tools as a Cake Tool #tool nuget:?package=CodeM.Common.Tools&version=1.0.0
netcoreTools
.netcore常用工具类集合
CryptoUtils
加密相关类
Base64编码方法
string Base64Encode(string text, string encoding = "utf-8")
参数: text:待编码的字符串 encoding:指定字符编码格式,默认utf-8
返回:经过Base64编码后的字符串
Base64解码方法
string Base64Decode(string base64Text, string encoding = "utf-8")
参数: base64Text:待解码的Base64编码的字符串 encoding:指定字符编码格式,默认utf-8
返回:经过Base64解码后的字符串
AES加密方法
string AESEncode(string text, string key, string encoding = "utf-8")
参数: text:待加密的字符串 key:加密字符串 encoding:指定字符编码格式,默认utf-8
返回:加密后的字符串
AES解密方法
string AESDecode(string aesText, string key, string encoding = "utf-8")
参数: aesText:待解密的AES加密字符串 key:加密字符串 encoding:指定字符编码格式,默认utf-8
返回:解密后的字符串
HashUtils
Hash算法类
MD5哈希计算
string MD5(string text, string encoding = "utf-8")
参数: text:待哈希计算的字符串 encoding:指定字符编码格式,默认utf-8
返回:经过MD5哈希计算的字符串
SHA1哈希计算
string SHA1(string text, string encoding = "utf-8")
参数: text:待哈希计算的字符串 encoding:指定字符编码格式,默认utf-8
返回:经过SHA1哈希计算的字符串
SHA256计算
string SHA256(string text, string encoding = "utf-8")
参数: text:待哈希计算的字符串 encoding:指定字符编码格式,默认utf-8
返回:经过SHA256哈希计算的字符串
SHA384计算
string SHA384(string text, string encoding = "utf-8")
参数: text:待哈希计算的字符串 encoding:指定字符编码格式,默认utf-8
返回:经过SHA384哈希计算的字符串
SHA512计算
string SHA512(string text, string encoding = "utf-8")
参数: text:待哈希计算的字符串 encoding:指定字符编码格式,默认utf-8
返回:经过SHA512哈希计算的字符串
XmlUtils
Xml文件遍历类
节点遍历方法
void Iterate(string file, XmlNodeInfoGetter callback = null)
参数: file:待遍历的XML文件绝对路径 callback:回调函数,可在回调函数中进行节点信息解析和收集
XmlNodeInfoGetter回调方法定义
bool XmlNodeInfoGetter(XmlNodeInfo nodeInfo);
参数: nodeInfo:当前遍历到的节点对象
返回:返回true,程序继续向下遍历;否则,停止遍历。
XmlNodeInfo对象
属性: Path:返回当前节点路径,如:/root/person LocalName:返回当前节点的本地名称 FullName:返回当前节点的全名称,包括命名空间和本地名称 NamespaceURI:返回当前节点的命名空间URI IsNode:返回当前节点是否元素节点 IsEndNode:遍历过程会两次经过一个节点,一次开始,一次结束,该属性返回是否为结束一次的遍历 IsTextNode:返回当前节点是否为文本节点 IsCDATANode:返回当前节点是否为CDATA节点 Text:返回当前节点的文本内容 CData:返回CDATA节点的内容 AttributeCount:返回节点属性的数量 Line:返回当前节点在文件中的行数
方法: bool HasAttributes()
返回:返回当前节点是否包括属性信息
string GetAttribute(int index) 参数: index:指定属性的索引位置 返回:返回指定索引位置的属性的内容
string GetAttribute(string name) 参数: name:指定属性的名称 返回:返回指定名称的属性的内容
string GetAttribute(string localName, string namespaceURI) 参数: localName:指定属性的本地名称 namespaceURI:指定属性的命名空间URI 返回:返回指定名称和命名空间的属性的内容
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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. |
.NET Core | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 2.1
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on CodeM.Common.Tools:
Package | Downloads |
---|---|
CodeM.Common.Orm
一套轻量级Object/Relational Mapping通用数据库操作框架 |
|
CodeM.Common.Ioc
.netcore 一套轻量级IOC操作库 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.6.9 | 933 | 7/27/2022 |
1.6.8 | 412 | 7/26/2022 |
1.6.5 | 396 | 7/25/2022 |
1.6.3 | 395 | 7/25/2022 |
1.6.2 | 396 | 7/25/2022 |
1.6.1 | 406 | 7/24/2022 |
1.6.0 | 835 | 7/22/2022 |
1.3.9 | 440 | 6/26/2022 |
1.3.8 | 406 | 6/26/2022 |
1.3.7 | 827 | 6/4/2022 |
1.3.6 | 522 | 3/25/2022 |
1.3.5 | 429 | 3/24/2022 |
1.3.1 | 2,042 | 3/14/2022 |
1.2.5 | 726 | 12/28/2021 |
1.2.3 | 294 | 12/19/2021 |
1.2.2 | 275 | 12/15/2021 |
1.2.0 | 1,045 | 11/13/2021 |
1.1.18 | 379 | 11/4/2021 |
1.1.16 | 551 | 11/3/2021 |
1.1.15 | 362 | 10/14/2021 |
1.1.12 | 326 | 9/30/2021 |
1.1.10 | 795 | 8/10/2021 |
1.1.9 | 358 | 8/10/2021 |
1.1.8 | 389 | 7/28/2021 |
1.1.7 | 346 | 7/14/2021 |
1.1.6 | 333 | 7/8/2021 |
1.1.5 | 376 | 6/25/2021 |
1.1.3 | 370 | 5/20/2021 |
1.1.2 | 356 | 5/20/2021 |
1.1.1 | 1,576 | 3/18/2021 |
1.1.0 | 832 | 3/3/2021 |
1.0.7 | 681 | 2/23/2021 |
1.0.5 | 1,597 | 11/18/2020 |
1.0.4 | 710 | 10/12/2020 |
1.0.3 | 717 | 9/19/2020 |
1.0.2 | 526 | 8/17/2020 |
1.0.1 | 1,037 | 4/30/2019 |
1.0.0 | 606 | 3/27/2019 |