SharpDevLib 2.0.0.1-alpha
This is a prerelease version of SharpDevLib.
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package SharpDevLib --version 2.0.0.1-alpha
NuGet\Install-Package SharpDevLib -Version 2.0.0.1-alpha
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="SharpDevLib" Version="2.0.0.1-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SharpDevLib --version 2.0.0.1-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SharpDevLib, 2.0.0.1-alpha"
#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 SharpDevLib as a Cake Addin #addin nuget:?package=SharpDevLib&version=2.0.0.1-alpha&prerelease // Install SharpDevLib as a Cake Tool #tool nuget:?package=SharpDevLib&version=2.0.0.1-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
sharp-dev-lib
介绍
sharp-dev-lib是c#中经常用到的工具库,基本都采用扩展的方式,方便客户端调用。
依赖说明
sharp-dev-lib使用.netstandard2.1框架,依赖第三方库如下:
Newtonsoft.Json (>= 13.0.1) 用于对序列化及对json格式美化
SixLabors.Fonts (>= 1.0.0-beta17)
SixLabors.ImageSharp.Drawing (>= 1.0.0-beta14) 用于画验证码
DotNetZip (>= 1.16.0) 用于文件压缩
SharpCompress (>= 0.31.0) 用于文件解压
安装教程
从nuget包管理器中搜索安装SharpDevLib
在Package Manager中执行命令
Install-Package SharpDevLib -Version 1.1.0
- 在dotnet cli中执行命令
dotnet add package SharpDevLib --version 1.1.0
使用说明
如果我们想对一个字符串进行md5 hash,代码示例如下:
//using SharpDevLib;
public void Md5Test()
{
var sampleString="HelloWorld";
var md5Hash=sampleString.MD5Hash();
Console.WriteLine(md5Hash);
}
//结果:68e109f0f40ca72a15e05cc22786f8e6
sharp-dev-lib包含如下表格的工具
名称 | 描述 | 使用 |
---|---|---|
CloneUtil | 提供对象的深克隆扩展方法 | 扩展方法 |
ConvertUtil | 提供格式转换的扩展方法(string转Guid,Boolean) | 扩展方法 |
EncodeUtil | 提供Base64,Url,Base64Url的编码和解码扩展方法 | 扩展方法 |
EnumerableUtil | 提供集合中对对象去重的扩展方法 | 扩展方法 |
EnumUtil | 提供枚举的取值和转换的扩展方法 | 扩展方法 |
HashUtil | 提供常用Hash以及文件的扩展方法 | 扩展方法 |
JsonUtil | 提供Json序列化和反序列化及美化的扩展方法 | 扩展方法 |
NullCheckUtil | 提供对象的空引用和空值断言的扩展方法 | 扩展方法 |
ReflectionUtil | 提供对象的类型名称以及确保对象是否包含公有无参构造函数的扩展方法 | 扩展方法 |
TimeUtil | 提供时间的UTC时间戳转换和输出格式的扩展方法 | 扩展方法 |
TreeUtil | 提供树形结构构建的扩展方法 | 实现ITreeNode接口,且在对象集合上使用扩展方法 |
UrlUtil | 提供路径合并的扩展方法 | 扩展方法 |
VerifyCodeUtil | 提供验证码的生成和保存为图片的扩展方法 | 扩展方法 |
ZipUtil | 文件的压缩和解压扩展方法 | 扩展方法 |
FileUtil | 文件保存扩展方法 | 扩展方法 |
StringUtil | Trim扩展方法 | 扩展方法 |
版本说明
时间 | 版本 | 描述 |
---|---|---|
2024-04-29 | v1.1.0 | 添加StringUtil,清理了代码 |
2022-07-09 | v1.0.5 | VerifyCodeUtil依赖库由"System.Drawing.Common"变更为"SixLabors.ImageSharp" |
2022-05-19 | v1.0.4 | HashUtil中GetHexString方法重命名为ToHexString,增加FromHexString方法 |
2022-05-13 | v1.0.3 | 增加1个工具(FileUtil) |
2022-05-09 | v1.0.2 | ConvertUtil工具移除list和DataTable的转换,转换将在SharpDevLib.Transport包中体现 |
2022-04-10 | v1.0.1 | 增加1个工具(ZipUtil),添加nuget打包的注释 |
2022-04-08 | v1.0.0 | 初始化13个工具(CloneUtil,ConvertUtil,EncodeUtil,EnumerableUtil,EnumUtil,HashUtil,JsonUtil,NullCheckUtil,ReflectionUtil,TimeUtil,TreeUtil,UrlUtil,VerifyCodeUtil) |
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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. 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.
-
.NETStandard 2.0
- System.Text.Json (>= 8.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.0 | 145 | 8/13/2024 |