Masuit.Tools.Core
2.1.3.1
| Advisory: https://github.com/advisories/GHSA-vh38-ghx6-vmvg | Severity: high |
See the version list below for details.
dotnet add package Masuit.Tools.Core --version 2.1.3.1
NuGet\Install-Package Masuit.Tools.Core -Version 2.1.3.1
<PackageReference Include="Masuit.Tools.Core" Version="2.1.3.1" />
<PackageVersion Include="Masuit.Tools.Core" Version="2.1.3.1" />
<PackageReference Include="Masuit.Tools.Core" />
paket add Masuit.Tools.Core --version 2.1.3.1
#r "nuget: Masuit.Tools.Core, 2.1.3.1"
#:package Masuit.Tools.Core@2.1.3.1
#addin nuget:?package=Masuit.Tools.Core&version=2.1.3.1
#tool nuget:?package=Masuit.Tools.Core&version=2.1.3.1
包含一些常用的操作类,大都是静态类,加密解密,反射操作,硬件信息,字符串扩展方法,日期时间扩展操作,大文件拷贝,图像裁剪,html处理,验证码、NoSql等常用封装。
示例代码:
1.检验字符串是否是Email
bool isEmail="1170397736@qq.com".MatchEmail();
2.获取线程内唯一对象
CallContext<T>.GetData("db");
3.获取当前请求上下文
var context=HttpContext2.Current;
4.获取IP详细地理信息
var address="114.114.114.114".GetPhysicsAddress();
5.大文件操作
FileStream fs = new FileStream(@"D:\boot.vmdk", FileMode.OpenOrCreate, FileAccess.ReadWrite);
{
//fs.CopyToFile(@"D:\1.bak");//同步复制大文件
fs.CopyToFileAsync(@"D:\1.bak");//异步复制大文件
string md5 = fs.GetFileMD5Async().Result;//异步获取文件的MD5
}
6.html的防XSS处理:
string html = @"<link href="/Content/font-awesome/css" rel="stylesheet" />
<!--[if IE 7]>
<link href='/Content/font-awesome-ie7.min.css' rel='stylesheet'/>
<![endif]-->
<script src="/Scripts/modernizr"></script>
<div id="searchBox" role="search">
<form action="/packages" method="get">
<span class="user-actions"><a href="/users/account/LogOff">退出</a></span>
<input name="q" id="searchBoxInput" />
<input id="searchBoxSubmit" type="submit" value="Submit" />
</form>
</div>";
string s = html.HtmlSantinizerStandard();//清理后:<div><span><a href="/users/account/LogOff">退出</a></span></div>
| 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. 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 | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 2.1
- AngleSharp (>= 0.9.10)
- HtmlSanitizer (>= 4.0.197)
- Microsoft.AspNetCore.All (>= 2.1.5)
- Newtonsoft.Json (>= 11.0.2)
- System.Drawing.Common (>= 4.5.1)
NuGet packages (24)
Showing the top 5 NuGet packages that depend on Masuit.Tools.Core:
| Package | Downloads |
|---|---|
|
BaseLibrary.ClassLibraryStand
Package Description |
|
|
L.52Abp.Application
52ABP框架Application应用层的基类 |
|
|
Masuit.Tools.AspNetCore
全龄段友好的C#万能工具库,码数吐司库(适用于.NET Core Web项目),不管你是菜鸟新手还是骨灰级玩家都能轻松上手,包含一些常用的操作类,大都是静态类,加密解密,反射操作,权重随机筛选算法,分布式短id,表达式树,linq扩展,文件压缩,多线程下载和FTP客户端,硬件信息,字符串扩展方法,日期时间扩展操作,中国农历,大文件拷贝,图像裁剪,验证码,断点续传,集合扩展等常用封装。包含一些AspNetCore常用的工具类、ModelBinder等。 官网教程:https://tools.masuit.org github:https://github.com/ldqk/Masuit.Tools |
|
|
BXJG.Utils
Package Description |
|
|
BlpIMSEFrame
BlpFrame是一套较为完整的微服务架构,整合SqlSugar、AOP、AutoMapper、常用帮助类、MiniProfiler、Swagger、Log4Net、WebApiClient、版本控制、JWT等功能模块。 |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Masuit.Tools.Core:
| Repository | Stars |
|---|---|
|
Redns/North
一个易于搭建的图床服务
|
|
|
DotNet-MoYu/SimpleAdmin
💥一个小而美的通用业务型后台管理系统。采用前后端分离的设计模式,基于RBAC+多机构的权限管理模式,实现接口级别的数据权限控制。集成国密加解密插件,注释详细,文档齐全,让你的开发少走弯路。
|
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 2026.1.3 | 239 | 3/20/2026 | |
| 2026.1.2 | 283 | 2/13/2026 | |
| 2026.1.1 | 293 | 1/19/2026 | |
| 2026.1.0 | 279 | 1/4/2026 | |
| 2025.6.4 | 917 | 11/21/2025 | |
| 2025.6.3 | 452 | 11/21/2025 | |
| 2025.6.2 | 444 | 11/21/2025 | |
| 2025.6.1 | 533 | 11/19/2025 | |
| 2025.6.0 | 498 | 11/18/2025 | |
| 2025.5.2 | 1,203 | 10/13/2025 | |
| 2025.5.1 | 1,017 | 9/17/2025 | |
| 2025.5.0 | 1,119 | 8/18/2025 | |
| 2025.4.6 | 2,120 | 8/1/2025 | |
| 2025.4.5 | 1,710 | 7/9/2025 | |
| 2025.4.4 | 1,267 | 6/22/2025 | |
| 2025.4.3 | 355 | 6/22/2025 | |
| 2025.4.2 | 449 | 6/20/2025 | |
| 2025.4.1 | 399 | 6/19/2025 | |
| 2025.4.0 | 345 | 6/19/2025 | |
| 2.1.3.1 | 3,418 | 11/23/2018 |
如有问题请联系QQ:1170397736,或者到项目的github反馈问题,详细的API文档在github上:https://github.com/ldqk/Masuit.Tools