Masuit.Tools 1.6.2

包含一些常用的操作类,大都是静态类,加密解密,反射操作,硬件信息,字符串扩展方法,日期时间扩展操作,大文件拷贝,图像裁剪,html处理,验证码、NoSql等常用封装。

示例代码:

1.检验字符串是否是Email

bool isEmail="1170397736@qq.com".MatchEmail();

2.获取CPU核心数

int core = SystemInfo.GetCpuCount();

3.大文件操作

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

}

4.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>

5.整理操作系统的内存:

Windows.ClearMemorySilent();

......

There is a newer version of this package available.
See the version list below for details.
Install-Package Masuit.Tools -Version 1.6.2
dotnet add package Masuit.Tools --version 1.6.2
<PackageReference Include="Masuit.Tools" Version="1.6.2">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Masuit.Tools --version 1.6.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

如有问题请联系QQ:1170397736,或者到项目的github反馈问题,详细的API文档在github上:https://github.com/ldqk/Masuit.Tools

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.2.7.3 50 10/30/2019
2.2.7.1 38 10/29/2019
2.2.6.4 47 10/16/2019
2.2.6.2 116 6/9/2019
2.2.6 131 4/9/2019
2.2.5.1 103 3/28/2019
2.2.5 110 3/20/2019
2.2.4.2 163 2/10/2019
2.2.4.1 122 1/24/2019
2.2.4 151 1/19/2019
2.2.3.3 187 1/6/2019
2.2.3 163 1/2/2019
2.2.2 153 12/31/2018
2.2.0.1 141 12/29/2018
2.2.0 143 12/29/2018
2.1.6.1 113 12/25/2018
2.1.5.1 139 12/22/2018
2.1.4.3 109 12/15/2018
2.1.4.1 122 12/15/2018
2.1.4 144 11/27/2018
2.1.3.1 133 11/23/2018
2.1.1 208 9/22/2018
2.1.0 164 9/6/2018
2.0.0 215 7/27/2018
1.9.11 237 7/10/2018
1.9.10 271 6/27/2018
1.9.9 242 6/6/2018
1.9.8 279 5/9/2018
1.9.7.6 400 4/21/2018
1.9.7.5 367 4/21/2018
1.9.7.4 370 4/21/2018
1.9.7.3 289 4/17/2018
1.9.7.2 294 4/16/2018
1.9.7.1 268 4/16/2018
1.9.7 293 4/16/2018
1.9.6 376 4/14/2018
1.9.5.4 334 4/2/2018
1.9.5.3 261 4/2/2018
1.9.5.2 440 4/1/2018
1.9.5.1 397 3/31/2018
1.9.5 419 3/25/2018
1.9.4.1 353 3/17/2018
1.9.4 247 3/17/2018
1.9.3.3 262 3/14/2018
1.9.3.2 236 3/13/2018
1.9.3.1 279 3/11/2018
1.9.3 273 3/11/2018
1.9.2 284 3/11/2018
1.9.1 280 3/9/2018
1.9.0 278 3/8/2018
1.8.7 304 3/3/2018
1.8.6 292 2/20/2018
1.8.5 304 2/3/2018
1.8.4 302 1/14/2018
1.8.3 299 1/13/2018
1.8.2 341 1/10/2018
1.8.1 381 1/5/2018
1.8.0 280 12/22/2017
1.7.9 286 12/8/2017
1.7.8 491 11/18/2017
1.7.7 235 11/7/2017
1.7.6 278 10/5/2017
1.7.5 248 10/1/2017
1.7.4 255 9/25/2017
1.7.2 239 9/22/2017
1.7.1 235 9/22/2017
1.7.0 234 9/22/2017
1.6.9 252 9/21/2017
1.6.8 258 9/15/2017
1.6.7 240 9/13/2017
1.6.6 259 9/10/2017
1.6.5 238 9/10/2017
1.6.4 231 9/8/2017
1.6.2 249 9/8/2017
1.6.1 247 9/7/2017
1.6.0 251 9/7/2017
1.5.1 244 8/31/2017
1.4.5 250 8/26/2017
1.4.4 271 8/25/2017
1.4.3 247 8/24/2017
1.4.2 271 8/7/2017
1.3.0.3 258 8/4/2017
1.3.0.2 260 8/4/2017
1.3.0.1 258 8/4/2017
1.3.0 261 7/27/2017
1.2.9 279 7/24/2017
1.2.8 267 7/23/2017
1.2.7 270 7/19/2017
1.2.6 258 7/12/2017
1.2.5 261 7/9/2017
1.2.4 352 7/8/2017
1.2.3 387 5/4/2017
1.2.1 334 4/26/2017
1.1.2 352 4/24/2017
1.1.0 360 4/10/2017
1.0.9 390 3/22/2017
1.0.8.2 333 3/8/2017
1.0.6 311 3/6/2017
1.0.5 331 3/5/2017
1.0.4 330 3/2/2017
1.0.2 342 2/19/2017
1.0.1 333 2/18/2017
Show less