Masuit.Tools 2.2.0

包含一些常用的操作类,大都是静态类,加密解密,反射操作,硬件信息,字符串扩展方法,日期时间扩展操作,大文件拷贝,图像裁剪,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 2.2.0
dotnet add package Masuit.Tools --version 2.2.0
<PackageReference Include="Masuit.Tools" Version="2.2.0">
  <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 2.2.0
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 51 10/30/2019
2.2.7.1 39 10/29/2019
2.2.6.4 48 10/16/2019
2.2.6.2 117 6/9/2019
2.2.6 132 4/9/2019
2.2.5.1 104 3/28/2019
2.2.5 111 3/20/2019
2.2.4.2 164 2/10/2019
2.2.4.1 123 1/24/2019
2.2.4 152 1/19/2019
2.2.3.3 188 1/6/2019
2.2.3 164 1/2/2019
2.2.2 154 12/31/2018
2.2.0.1 142 12/29/2018
2.2.0 144 12/29/2018
2.1.6.1 114 12/25/2018
2.1.5.1 140 12/22/2018
2.1.4.3 110 12/15/2018
2.1.4.1 123 12/15/2018
2.1.4 145 11/27/2018
2.1.3.1 134 11/23/2018
2.1.1 209 9/22/2018
2.1.0 165 9/6/2018
2.0.0 216 7/27/2018
1.9.11 238 7/10/2018
1.9.10 272 6/27/2018
1.9.9 243 6/6/2018
1.9.8 280 5/9/2018
1.9.7.6 401 4/21/2018
1.9.7.5 368 4/21/2018
1.9.7.4 371 4/21/2018
1.9.7.3 290 4/17/2018
1.9.7.2 295 4/16/2018
1.9.7.1 269 4/16/2018
1.9.7 294 4/16/2018
1.9.6 377 4/14/2018
1.9.5.4 335 4/2/2018
1.9.5.3 262 4/2/2018
1.9.5.2 441 4/1/2018
1.9.5.1 398 3/31/2018
1.9.5 420 3/25/2018
1.9.4.1 354 3/17/2018
1.9.4 248 3/17/2018
1.9.3.3 263 3/14/2018
1.9.3.2 237 3/13/2018
1.9.3.1 280 3/11/2018
1.9.3 274 3/11/2018
1.9.2 285 3/11/2018
1.9.1 281 3/9/2018
1.9.0 279 3/8/2018
1.8.7 305 3/3/2018
1.8.6 293 2/20/2018
1.8.5 305 2/3/2018
1.8.4 303 1/14/2018
1.8.3 300 1/13/2018
1.8.2 342 1/10/2018
1.8.1 382 1/5/2018
1.8.0 281 12/22/2017
1.7.9 287 12/8/2017
1.7.8 492 11/18/2017
1.7.7 236 11/7/2017
1.7.6 279 10/5/2017
1.7.5 249 10/1/2017
1.7.4 256 9/25/2017
1.7.2 240 9/22/2017
1.7.1 236 9/22/2017
1.7.0 235 9/22/2017
1.6.9 253 9/21/2017
1.6.8 259 9/15/2017
1.6.7 241 9/13/2017
1.6.6 260 9/10/2017
1.6.5 239 9/10/2017
1.6.4 232 9/8/2017
1.6.2 250 9/8/2017
1.6.1 248 9/7/2017
1.6.0 252 9/7/2017
1.5.1 245 8/31/2017
1.4.5 251 8/26/2017
1.4.4 272 8/25/2017
1.4.3 248 8/24/2017
1.4.2 272 8/7/2017
1.3.0.3 259 8/4/2017
1.3.0.2 261 8/4/2017
1.3.0.1 259 8/4/2017
1.3.0 262 7/27/2017
1.2.9 280 7/24/2017
1.2.8 268 7/23/2017
1.2.7 271 7/19/2017
1.2.6 259 7/12/2017
1.2.5 262 7/9/2017
1.2.4 353 7/8/2017
1.2.3 388 5/4/2017
1.2.1 335 4/26/2017
1.1.2 353 4/24/2017
1.1.0 361 4/10/2017
1.0.9 391 3/22/2017
1.0.8.2 334 3/8/2017
1.0.6 312 3/6/2017
1.0.5 332 3/5/2017
1.0.4 331 3/2/2017
1.0.2 343 2/19/2017
1.0.1 334 2/18/2017
Show less