Masuit.Tools.Core
by: 懒得勤快
- 3 total downloads
- Latest version: 1.8.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();
......
MessagePack
by: neuecc
- 66 total downloads
- Latest version: 1.9.11
Extremely Fast MessagePack(MsgPack) Serializer for C#(.NET, .NET Core, Unity, Xamarin).
MessagePackAnalyzer
by: neuecc, aarnott
- 76 total downloads
- Latest version: 3.1.4
Analyzers and source generator for MessagePack for C#. Verify rules for [MessagePackObject] and code fix for [Key]. A roslyn source generator for AOT or faster startup of applications that use the MessagePack nuget package.
Microsoft.ApplicationInsights.Agent.Intercept
by: Microsoft
- 9 total downloads
- Latest version: 2.4.0
This NuGet enables Interception of method calls. Privacy statement: https://go.microsoft.com/fwlink/?LinkId=512156
Microsoft.ApplicationInsights.AspNetCore
by: Microsoft
- 29 total downloads
- Latest version: 2.17.0
Application Insights for ASP.NET Core web applications. See https://azure.microsoft.com/documentation/articles/app-insights-asp-net-five/ for more information. Privacy statement: https://go.microsoft.com/fwlink/?LinkId=512156
Microsoft.ApplicationInsights.DependencyCollector
by: Microsoft
- 40 total downloads
- Latest version: 2.23.0
Application Insights Dependency Collector for .NET applications. This is a dependent package for Application Insights platform specific packages and provides automatic collection of dependency telemetry. Please install the platform specific packages directly for the best experience. Privacy statement: https://go.microsoft.com/fwlink/?LinkId=512156
Microsoft.ApplicationInsights.PerfCounterCollector
by: Microsoft
- 40 total downloads
- Latest version: 2.23.0
Application Insights Performance Counters Collector allows you to send data collected by Performance Counters to Application Insights. Privacy statement: https://go.microsoft.com/fwlink/?LinkId=512156
Microsoft.ApplicationInsights.WindowsServer
by: Microsoft
- 37 total downloads
- Latest version: 2.23.0
Application Insights Windows Server nuget package provides automatic collection of application insights telemetry for .NET applications. This package can be used as a dependent package for Application Insights platform specific packages or as a standalone package for .NET applications that are not covered by platform specific packages (like for .NET worker roles). Privacy statement: https://go.microsoft.com/fwlink/?LinkId=512156
Microsoft.AspNet.WebApi.Client
by: Microsoft
- 16 total downloads
- Latest version: 6.0.0
This package adds support for formatting and content negotiation to System.Net.Http. It includes support for JSON, XML, and form URL encoded data.
Microsoft.AspNetCore.All
by: Microsoft
- 1 total downloads
- Latest version: 2.0.0
Microsoft.AspNetCore.All
Microsoft.AspNetCore.Antiforgery
by: Microsoft
- 12 total downloads
- Latest version: 2.0.0
An antiforgery system for ASP.NET Core designed to generate and validate tokens to prevent Cross-Site Request Forgery attacks.
Microsoft.AspNetCore.Authentication
by: Microsoft
- 11 total downloads
- Latest version: 2.0.0
ASP.NET Core common types used by the various authentication middleware components.
Microsoft.AspNetCore.Authentication.Cookies
by: Microsoft
- 11 total downloads
- Latest version: 2.0.0
ASP.NET Core middleware that enables an application to use cookie based authentication.
Microsoft.AspNetCore.Authentication.Core
by: Microsoft
- 2 total downloads
- Latest version: 2.0.0
ASP.NET Core common types used by the various authentication middleware components.
Microsoft.AspNetCore.Authentication.Facebook
by: Microsoft
- 11 total downloads
- Latest version: 2.0.0
ASP.NET Core middleware that enables an application to support Facebook's OAuth 2.0 authentication workflow.
Microsoft.AspNetCore.Authentication.Google
by: Microsoft
- 11 total downloads
- Latest version: 2.0.0
ASP.NET Core contains middleware to support Google's OpenId and OAuth 2.0 authentication workflows.
Microsoft.AspNetCore.Authentication.JwtBearer
by: Microsoft
- 10 total downloads
- Latest version: 2.0.0
ASP.NET Core middleware that enables an application to receive an OpenID Connect bearer token.
Microsoft.AspNetCore.Authentication.OAuth
by: Microsoft
- 11 total downloads
- Latest version: 2.0.0
ASP.NET Core middleware that enables an application to support any standard OAuth 2.0 authentication workflow.
Microsoft.AspNetCore.Authentication.Twitter
by: Microsoft
- 11 total downloads
- Latest version: 2.0.0
ASP.NET Core middleware that enables an application to support Twitter's OAuth 1.0 authentication workflow.