Masuit.Tools 1.8.6

包含一些常用的操作类,大都是静态类,加密解密,反射操作,硬件信息,字符串扩展方法,日期时间扩展操作,大文件拷贝,图像裁剪,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.8.6
dotnet add package Masuit.Tools --version 1.8.6
<PackageReference Include="Masuit.Tools" Version="1.8.6">
  <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.8.6
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 54 10/30/2019
2.2.7.1 43 10/29/2019
2.2.6.4 51 10/16/2019
2.2.6.2 119 6/9/2019
2.2.6 134 4/9/2019
2.2.5.1 106 3/28/2019
2.2.5 113 3/20/2019
2.2.4.2 168 2/10/2019
2.2.4.1 125 1/24/2019
2.2.4 154 1/19/2019
2.2.3.3 190 1/6/2019
2.2.3 166 1/2/2019
2.2.2 156 12/31/2018
2.2.0.1 144 12/29/2018
2.2.0 146 12/29/2018
2.1.6.1 116 12/25/2018
2.1.5.1 142 12/22/2018
2.1.4.3 113 12/15/2018
2.1.4.1 125 12/15/2018
2.1.4 148 11/27/2018
2.1.3.1 137 11/23/2018
2.1.1 209 9/22/2018
2.1.0 167 9/6/2018
2.0.0 218 7/27/2018
1.9.11 239 7/10/2018
1.9.10 273 6/27/2018
1.9.9 245 6/6/2018
1.9.8 283 5/9/2018
1.9.7.6 403 4/21/2018
1.9.7.5 371 4/21/2018
1.9.7.4 373 4/21/2018
1.9.7.3 292 4/17/2018
1.9.7.2 297 4/16/2018
1.9.7.1 272 4/16/2018
1.9.7 296 4/16/2018
1.9.6 380 4/14/2018
1.9.5.4 338 4/2/2018
1.9.5.3 265 4/2/2018
1.9.5.2 444 4/1/2018
1.9.5.1 400 3/31/2018
1.9.5 422 3/25/2018
1.9.4.1 355 3/17/2018
1.9.4 249 3/17/2018
1.9.3.3 263 3/14/2018
1.9.3.2 239 3/13/2018
1.9.3.1 281 3/11/2018
1.9.3 275 3/11/2018
1.9.2 285 3/11/2018
1.9.1 282 3/9/2018
1.9.0 280 3/8/2018
1.8.7 305 3/3/2018
1.8.6 293 2/20/2018
1.8.5 307 2/3/2018
1.8.4 305 1/14/2018
1.8.3 304 1/13/2018
1.8.2 345 1/10/2018
1.8.1 384 1/5/2018
1.8.0 282 12/22/2017
1.7.9 288 12/8/2017
1.7.8 494 11/18/2017
1.7.7 237 11/7/2017
1.7.6 281 10/5/2017
1.7.5 251 10/1/2017
1.7.4 257 9/25/2017
1.7.2 241 9/22/2017
1.7.1 237 9/22/2017
1.7.0 237 9/22/2017
1.6.9 255 9/21/2017
1.6.8 261 9/15/2017
1.6.7 243 9/13/2017
1.6.6 261 9/10/2017
1.6.5 240 9/10/2017
1.6.4 233 9/8/2017
1.6.2 251 9/8/2017
1.6.1 249 9/7/2017
1.6.0 254 9/7/2017
1.5.1 247 8/31/2017
1.4.5 252 8/26/2017
1.4.4 273 8/25/2017
1.4.3 249 8/24/2017
1.4.2 275 8/7/2017
1.3.0.3 261 8/4/2017
1.3.0.2 263 8/4/2017
1.3.0.1 261 8/4/2017
1.3.0 265 7/27/2017
1.2.9 282 7/24/2017
1.2.8 270 7/23/2017
1.2.7 274 7/19/2017
1.2.6 262 7/12/2017
1.2.5 265 7/9/2017
1.2.4 355 7/8/2017
1.2.3 389 5/4/2017
1.2.1 337 4/26/2017
1.1.2 356 4/24/2017
1.1.0 366 4/10/2017
1.0.9 393 3/22/2017
1.0.8.2 336 3/8/2017
1.0.6 314 3/6/2017
1.0.5 334 3/5/2017
1.0.4 332 3/2/2017
1.0.2 343 2/19/2017
1.0.1 334 2/18/2017
Show less