Jt.Common.Tool 1.1.5

dotnet add package Jt.Common.Tool --version 1.1.5
                    
NuGet\Install-Package Jt.Common.Tool -Version 1.1.5
                    
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="Jt.Common.Tool" Version="1.1.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jt.Common.Tool" Version="1.1.5" />
                    
Directory.Packages.props
<PackageReference Include="Jt.Common.Tool" />
                    
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 Jt.Common.Tool --version 1.1.5
                    
#r "nuget: Jt.Common.Tool, 1.1.5"
                    
#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 Jt.Common.Tool@1.1.5
                    
#: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=Jt.Common.Tool&version=1.1.5
                    
Install as a Cake Addin
#tool nuget:?package=Jt.Common.Tool&version=1.1.5
                    
Install as a Cake Tool

Jt.Common.Tool

一些公共帮助类、扩展方法

Extension

HttpClientExtension

  • Get请求

  • Post请求

ObjectExtension

  • 实例对象序列化成json

  • 深拷贝(反射)

  • 深拷贝(序列化)

  • 复制有相同属性的值到另一个实例

  • 对列表元素操作,复制有相同属性的值到另一个实例

  • 实例字符串类型字段填充空字符串

  • byte数组转换为对应的16进制字符串,是否有空格

  • byte数组转换为对应的16进制字符串,填充字符

  • 将byte类型的转换为16进制字符串

  • 判断list是否为null或者为空

  • 判断list是否不为null并且不为空

StringExtension

  • 判断字符串是否为空或只有空格

  • 判断字符串是否不为空或只有空格

  • 反序列化为指定类型的实例

  • MD5加密

DateTimeJsonConverter

ExpressionExtend

  • 合并表达式 expr1 AND expr2

  • 合并表达式 expr1 or expr2

  • 表达式取非

QueryableExtension

  • 分页查询

ServiceCollectionExtension

  • 服务接口注入

Helper

AppDomainHelper

  • 获取程序根目标

  • 在根目录创建文件夹

AssemblyHelper

  • 获取程序集的所有方法

  • 获取类型的所有方法

  • 获取程序集存在指定特性的方法

  • 获取类型存在指定特性的方法

  • 获取程序集继承了指定类型的子类的类型

  • 获取多个程序集继承了指定类型的子类的类型

  • 获取程序集存在指定特性的类型

  • 获取多个程序集存在指定特性的类型

DateTimeHelper

  • 获取时间戳Timestamp

  • 时间戳Timestamp转换成日期

EnumHelper

  • 获取枚举的每一项

  • 获取枚举值上的描述

  • 枚举类型转换为List

ExpressionHelper

  • 构建表达式目录树

FileInfoHelper

  • 将文本写入文件

NamedHelper

  • 转化为下划线命名 user_name

  • 转化为驼峰命名 userName

  • 转化为Pascal命名 UserName

ResSystemHelper

  • 检测目录是否存在,若不存在则创建

  • 获取去除拓展名的文件路径

  • 获取父目录的路径信息

  • 获取文件名称

  • 获取指定路径和基础目录的相对路径

  • 获取路径路径下所有文件信息

  • 获取指定目录下所有文件列表

RSAHelper

  • RSA加密

  • RSA解密

SnowflakeHelper

  • 生成雪花id

ValidateHelper

  • 验证输入字符串是否与模式字符串匹配

  • 验证输入字符串是否与模式字符串匹配(有筛选条件)

  • 返回字符串真实长度

  • 校验用户名有效性

  • 校验密码有效性

  • 校验int有效性

  • 校验是否数字字符串

  • 校验是否整数字符串

  • 校验是否整数字符串(带正负号)

  • 校验是否是浮点数

  • 校验是否是浮点数 (可带正负号)

  • 校验是否有中文字符

  • 获取含有中文字符串的实际长度

  • 校验输入字母

  • 验证身份证是否合法 15 和 18位两种

  • 校验是否是邮件地址

  • 校验邮编有效性

  • 校验固定电话有效性

  • 校验手机有效性

  • 校验电话有效性(固话和手机 )

  • 校验Url有效性

  • 校验IP有效性

  • 校验域名有效性

  • 校验是否为base64字符串

  • 校验字符串是否是GUID

  • 校验输入的字符是否为日期

  • 校验输入的字符是否为日期时间

  • 校验字符串最大长度,返回指定长度的串

  • 校验是否为json

ZipHelper

  • 根据给的文件参数,自动进行压缩或解压缩操作

  • 压缩所有文件为zip

  • 压缩指定的文件或文件夹为zip

  • 判断文件名中是否含有ignoreNames中的某一项

  • 压缩所有文件files,为压缩文件zipFile, 以相对于BaseDir的路径构建压缩文件子目录,ignoreNames指定要忽略的文件或目录

  • 解压文件 到指定的路径,可通过targeFileNames指定解压特定的文件

Product 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.  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 (1)

Showing the top 1 NuGet packages that depend on Jt.Common.Tool:

Package Downloads
Jt.Common.Tool.RabbitMq

RabbitMQ的封装

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.5 238 6/2/2024
1.1.4 229 6/2/2024
1.1.3 218 6/1/2024
1.1.2 235 5/29/2024
1.1.1 245 5/21/2024
1.1.0 230 5/21/2024
1.0.9 227 5/21/2024
1.0.8 220 5/2/2024
1.0.7 298 8/21/2023
1.0.6 244 8/21/2023
1.0.5 221 8/19/2023
1.0.4 254 8/19/2023
1.0.3 236 8/19/2023
1.0.2 261 8/14/2023
1.0.1 265 8/2/2023
1.0.0 287 7/20/2023