Xunet 1.0.5
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Framework 4.5
This package targets .NET Framework 4.5. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Xunet --version 1.0.5
NuGet\Install-Package Xunet -Version 1.0.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="Xunet" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xunet --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Xunet, 1.0.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.
// Install Xunet as a Cake Addin #addin nuget:?package=Xunet&version=1.0.5 // Install Xunet as a Cake Tool #tool nuget:?package=Xunet&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
常用工具库
扩展类
1、日期时间扩展类
// 获取当前时间戳
var timeStamp = DateTime.Now.ToTimeStamp();
// 时间戳转DateTime
var dateTime = timeStamp.ToDateTime();
2、Ffmpeg扩展类
// 音频文件路径
var audio_path = "音频文件路径";
// 获取音频文件时长
var length = audio_path.GetMediaLength("Ffmpeg.exe所在目录,默认当前目录");
// 视频文件路径
var video_path = "视频文件路径";
// 获取视频截图
var image = video_path.CatchVideoImg("目标存储路径", "Ffmpeg.exe所在目录,默认当前目录");
3、HttpClient扩展类
// 接口地址
var url = "https://api.demo.com/test";
// GET请求
var result = await url.HttpGetAsync();
// POST请求(支持application/json和form-data)
var result2 = await url.HttpPostAsync(HttpContentType.ApplicationJson,
new { id = "参数1", name = "参数2" });
4、Json扩展类
// object对象
var data = new { code = 0, message = "" };
// JSON序列化
var json = data.SerializeObject();
// JSON反序列化
var obj = json.DeserializeObject<object>();
5、随机数扩展类
// 获取8位数随机字符串
// 参数:level,复杂等级,0纯数字,1数字+字母,2数字+字母+特殊字符
var text = 8.NextString(2);
6、加解密扩展类
// 输入字符串
var input = "123456";
// MD5加密
var md5Value = input.ToMD5Encrypt();
// SHA256加密
var sha256Value = input.ToSHA256Encrypt();
// AES加密
var aesValue = input.ToAESEncrypt();
// AES解密
var aesText = aesValue.ToAESDecrypt();
// RSA加密
// 获取RSA公钥和私钥(2048位)
var key = 2048.ToRSASecretKey();
// 公钥加密
var rsaValue = input.ToRSAEncrypt(key.PublicKey);
// 私钥解密
var rsaText = rsaValue.ToRSADecrypt(key.PrivateKey);
7、String扩展类
// 判断是否是null或者空字符串
var isNull = "".IsNullOrEmpty();
// 判断是否非null且非空字符串
var isNotNull = "123456".IsNotNullOrEmpty();
辅助类
1、雪花ID
// 获取雪花Id
var id1 = SnowflakeHelper.NextId();
// 获取雪花Id字符串
var id2 = SnowflakeHelper.NextIdString();
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 is compatible. 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 Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.5
- No dependencies.
-
net6.0
- Microsoft.AspNetCore (>= 2.2.0)
- System.Collections.NonGeneric (>= 4.3.0)
- System.Collections.Specialized (>= 4.3.0)
- System.ComponentModel.TypeConverter (>= 4.3.0)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
- System.Runtime.InteropServices (>= 4.3.0)
- System.Runtime.Serialization.Primitives (>= 4.3.0)
- System.Threading.Thread (>= 4.3.0)
-
net7.0
- Microsoft.AspNetCore (>= 2.2.0)
- System.Collections.NonGeneric (>= 4.3.0)
- System.Collections.Specialized (>= 4.3.0)
- System.ComponentModel.TypeConverter (>= 4.3.0)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
- System.Runtime.InteropServices (>= 4.3.0)
- System.Runtime.Serialization.Primitives (>= 4.3.0)
- System.Threading.Thread (>= 4.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Xunet:
Package | Downloads |
---|---|
Xunet.WinFormium
A Lightweight WinForm Application Framework For .NET |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.23 | 146 | 8/16/2024 |
1.0.22 | 138 | 7/3/2024 |
1.0.21 | 103 | 6/28/2024 |
1.0.20 | 90 | 6/25/2024 |
1.0.19 | 127 | 4/10/2024 |
1.0.18 | 134 | 12/15/2023 |
1.0.17 | 135 | 11/28/2023 |
1.0.16 | 137 | 11/27/2023 |
1.0.15 | 122 | 11/27/2023 |
1.0.14 | 149 | 8/8/2023 |
1.0.13 | 169 | 8/7/2023 |
1.0.12 | 192 | 7/13/2023 |
1.0.11 | 163 | 7/4/2023 |
1.0.10 | 174 | 6/12/2023 |
1.0.9 | 163 | 6/8/2023 |
1.0.8 | 177 | 6/8/2023 |
1.0.7 | 223 | 6/7/2023 |
1.0.6 | 170 | 6/6/2023 |
1.0.5 | 161 | 6/6/2023 |
1.0.4 | 169 | 6/5/2023 |
1.0.3 | 146 | 6/5/2023 |
1.0.2 | 167 | 6/5/2023 |