Masuit.Tools.Core
2.2.0
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.2.0
NuGet\Install-Package Masuit.Tools.Core -Version 2.2.0
<PackageReference Include="Masuit.Tools.Core" Version="2.2.0" />
paket add Masuit.Tools.Core --version 2.2.0
#r "nuget: Masuit.Tools.Core, 2.2.0"
// Install Masuit.Tools.Core as a Cake Addin
#addin nuget:?package=Masuit.Tools.Core&version=2.2.0
// Install Masuit.Tools.Core as a Cake Tool
#tool nuget:?package=Masuit.Tools.Core&version=2.2.0
Masuit.Tools
包含一些常用的操作类,大都是静态类,加密解密,反射操作,硬件信息,字符串扩展方法,日期时间扩展操作,大文件拷贝,图像裁剪,验证码等常用封装。 官网教程
Masuit.Tools.AspNetCore.ResumeFileResults
允许你在ASP.NET Core中通过MVC/WebAPI应用程序传输文件数据时使用断点续传以及多线程下载。
它允许提供ETag
标题以及Last-Modified
标题。 它还支持以下前置条件标题:If-Match
,If-None-Match
,If-Modified-Since
,If-Unmodified-Since
,If-Range
。
支持 ASP.NET Core 2.0
从.NET Core2.0开始,ASP.NET Core内部支持断点续传。 因此删除了与断点续传相关的所有代码。 只留下了“Content-Disposition” Inline的一部分。 现在所有代码都依赖于基础.NET类。 还删除了对多部分请求的支持。 为了支持我将不得不复制很多原始代码,因为目前没有办法简单地覆盖基类的某些部分。
如何使用
要使用ResumeFileResults,必须在Startup.cs
的ConfigureServices
方法调用中配置服务:
using Masuit.Tools.AspNetCore.ResumeFileResults.DependencyInjection;
public void ConfigureServices(IServiceCollection services)
{
services.AddResumeFileResult();
}
然后在你的控制器中,你可以像在FileResult
帮助器中构建一样使用它。
using Masuit.Tools.AspNetCore.ResumeFileResults.Extensions;
public IActionResult FileContents()
{
string webRoot = this.hostingEnvironment.WebRootPath;
var contents = System.IO.File.ReadAllBytes(Path.Combine(webRoot, "TestFile.txt"));
return this.ResumeFile(contents, "text/plain", "TestFile.txt");
}
public IActionResult FileStream()
{
string webRoot = this.hostingEnvironment.WebRootPath;
FileStream stream = System.IO.File.OpenRead(Path.Combine(webRoot, "TestFile.txt"));
return this.ResumeFile(stream, "text/plain", "TestFile.txt");
}
public IActionResult PhysicalFile()
{
string webRoot = this.hostingEnvironment.WebRootPath;
return this.ResumePhysicalFile(Path.Combine(webRoot, "TestFile.txt"), "text/plain", "TestFile.txt");
}
public IActionResult VirtualFile()
{
return this.ResumeFile("TestFile.txt", "text/plain", "TestFile.txt");
}
以上示例将为您的数据提供“Content-Disposition:attachment”。 当没有提供fileName时,数据将作为“Content-Disposition:inline”提供。
另外,它可以提供ETag
和LastModified
标题。
public IActionResult File()
{
return new ResumeVirtualFileResult("TestFile.txt", "text/plain", "\"MyEtagHeader\"")
{
FileDownloadName = "TestFile.txt",
LastModified = DateTimeOffset.Now
};
}
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. |
.NET Core | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 2.1
- AngleSharp (>= 0.9.11)
- HtmlSanitizer (>= 4.0.199)
- Microsoft.AspNetCore.All (>= 2.1.5)
- Newtonsoft.Json (>= 12.0.1)
- SharpZipLib (>= 1.1.0)
- System.Drawing.Common (>= 4.5.1)
NuGet packages (16)
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 |
|
BlpIMSEFrame
BlpFrame是一套较为完整的微服务架构,整合SqlSugar、AOP、AutoMapper、常用帮助类、MiniProfiler、Swagger、Log4Net、WebApiClient、版本控制、JWT等功能模块。 |
|
ZTC.RiSen.Sdk
七迈车-日森洗车机Sdk AspNetCore Net6 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2024.3.4 | 52 | 5/11/2024 | |
2024.3.3 | 60 | 5/10/2024 | |
2024.3.2 | 51 | 5/9/2024 | |
2024.3.1 | 51 | 5/9/2024 | |
2024.3.0 | 47 | 5/9/2024 | |
2024.2.0 | 169 | 4/30/2024 | |
2024.1.0 | 441 | 4/12/2024 | |
2.6.9.9 | 304 | 4/2/2024 | |
2.6.9.8 | 265 | 3/22/2024 | |
2.6.9.7 | 282 | 3/21/2024 | |
2.6.9.6 | 172 | 3/21/2024 | |
2.6.9.5 | 197 | 3/20/2024 | |
2.6.9.4 | 585 | 3/11/2024 | |
2.6.9.3 | 271 | 3/7/2024 | |
2.6.9.2 | 439 | 2/22/2024 | |
2.6.9.1 | 461 | 2/3/2024 | |
2.6.9 | 419 | 1/30/2024 | |
2.6.8.9 | 569 | 1/19/2024 | |
2.6.8.8 | 783 | 1/11/2024 | |
2.6.8.7 | 1,127 | 12/29/2023 | |
2.6.8.6 | 496 | 12/28/2023 | |
2.6.8.5 | 762 | 12/22/2023 | |
2.6.8.4 | 681 | 12/17/2023 | |
2.6.8.3 | 577 | 12/15/2023 | |
2.6.8.2 | 1,387 | 12/1/2023 | |
2.6.8.1 | 4,134 | 11/22/2023 | |
2.6.8 | 716 | 11/17/2023 | |
2.6.7.5 | 1,814 | 11/5/2023 | |
2.6.7.4 | 1,264 | 10/25/2023 | |
2.6.7.3 | 903 | 10/16/2023 | |
2.6.7.2 | 1,245 | 9/20/2023 | |
2.6.7.1 | 1,034 | 9/14/2023 | |
2.6.7 | 727 | 9/12/2023 | |
2.6.6.9 | 799 | 9/9/2023 | |
2.6.6.8 | 718 | 9/7/2023 | |
2.6.6.7 | 712 | 9/7/2023 | |
2.6.6.6 | 736 | 9/6/2023 | |
2.6.6.5 | 665 | 9/6/2023 | |
2.6.6.4 | 683 | 9/5/2023 | |
2.6.6.3 | 1,760 | 8/31/2023 | |
2.6.6.2 | 926 | 8/27/2023 | |
2.6.6.1 | 1,014 | 8/18/2023 | |
2.6.6 | 769 | 8/15/2023 | |
2.6.5 | 738 | 8/14/2023 | |
2.6.4.1 | 787 | 8/11/2023 | |
2.6.4 | 1,042 | 8/3/2023 | |
2.6.3.1 | 1,157 | 7/20/2023 | |
2.6.3 | 1,421 | 7/18/2023 | |
2.6.2.10 | 1,095 | 7/14/2023 | |
2.6.2.9 | 1,022 | 7/10/2023 | |
2.6.2.8 | 857 | 7/9/2023 | |
2.6.2.7 | 814 | 7/6/2023 | |
2.6.2.6 | 801 | 7/6/2023 | |
2.6.2.5 | 1,538 | 6/20/2023 | |
2.6.2.4 | 773 | 6/19/2023 | |
2.6.2.3 | 1,215 | 6/9/2023 | |
2.6.2.2 | 741 | 6/9/2023 | |
2.6.2.1 | 950 | 6/1/2023 | |
2.6.2 | 3,194 | 5/24/2023 | |
2.6.1 | 2,377 | 5/6/2023 | |
2.6.0.2 | 2,498 | 4/19/2023 | |
2.6.0.1 | 882 | 4/18/2023 | |
2.6.0 | 1,666 | 4/18/2023 | |
2.5.9.9 | 1,413 | 4/14/2023 | |
2.5.9.8 | 993 | 4/14/2023 | |
2.5.9.7 | 1,173 | 4/13/2023 | |
2.5.9.6 | 1,838 | 4/11/2023 | |
2.5.9.5 | 1,074 | 4/8/2023 | |
2.5.9.4 | 1,752 | 3/22/2023 | |
2.5.9.3 | 2,610 | 3/4/2023 | |
2.5.9.2 | 3,698 | 2/4/2023 | |
2.5.9.1 | 3,815 | 12/22/2022 | |
2.5.9 | 1,393 | 12/16/2022 | |
2.5.9-beta | 835 | 12/14/2022 | |
2.5.8.3 | 2,267 | 12/10/2022 | |
2.5.8.2 | 1,961 | 12/6/2022 | |
2.5.8.1 | 1,955 | 12/1/2022 | |
2.5.8 | 3,161 | 11/23/2022 | |
2.5.7.7 | 1,602 | 11/18/2022 | |
2.5.7.6 | 1,604 | 11/15/2022 | |
2.5.7.5 | 1,673 | 11/10/2022 | |
2.5.7.4 | 1,958 | 11/10/2022 | |
2.5.7.3 | 1,448 | 11/9/2022 | |
2.5.7.2 | 1,641 | 11/7/2022 | |
2.5.7.1 | 3,835 | 11/3/2022 | |
2.5.7 | 1,440 | 11/3/2022 | |
2.5.6.3 | 7,378 | 10/25/2022 | |
2.5.6.2 | 2,262 | 10/24/2022 | |
2.5.6.1 | 1,565 | 10/24/2022 | |
2.5.6 | 3,658 | 10/18/2022 | |
2.5.5.1 | 3,210 | 10/6/2022 | |
2.5.5 | 3,576 | 9/17/2022 | |
2.5.4.3 | 2,880 | 9/6/2022 | |
2.5.4.2 | 1,702 | 9/3/2022 | |
2.5.4.1 | 1,556 | 9/3/2022 | |
2.5.4 | 1,690 | 8/31/2022 | |
2.5.3 | 5,599 | 8/25/2022 | |
2.5.3-beta | 1,209 | 8/4/2022 | |
2.5.2 | 13,014 | 7/4/2022 | |
2.5.1 | 1,704 | 7/2/2022 | |
2.5.0.2 | 1,617 | 7/1/2022 | |
2.5.0.1 | 1,549 | 7/1/2022 | |
2.5.0 | 2,356 | 6/28/2022 | |
2.4.9.4 | 6,673 | 6/21/2022 | |
2.4.9.3 | 1,899 | 6/14/2022 | |
2.4.9.2 | 3,187 | 6/7/2022 | |
2.4.9.1 | 1,606 | 6/7/2022 | |
2.4.9 | 1,661 | 6/7/2022 | |
2.4.8.10 | 2,811 | 5/26/2022 | |
2.4.8.9 | 1,679 | 5/25/2022 | |
2.4.8.8 | 1,787 | 5/25/2022 | |
2.4.8.7 | 1,606 | 5/24/2022 | |
2.4.8.6 | 3,178 | 4/25/2022 | |
2.4.8.5 | 2,357 | 4/18/2022 | |
2.4.8.4 | 1,714 | 4/15/2022 | |
2.4.8.3 | 2,397 | 4/1/2022 | |
2.4.8.2 | 2,280 | 3/23/2022 | |
2.4.8.1 | 1,761 | 3/23/2022 | |
2.4.8 | 1,872 | 3/23/2022 | |
2.4.7.9 | 3,160 | 3/17/2022 | |
2.4.7.8 | 2,827 | 3/8/2022 | |
2.4.7.7 | 1,442 | 3/7/2022 | |
2.4.7.6 | 2,046 | 3/1/2022 | |
2.4.7.5 | 2,710 | 2/9/2022 | |
2.4.7.4 | 1,700 | 1/25/2022 | |
2.4.7.3 | 1,645 | 1/18/2022 | |
2.4.7.2 | 3,580 | 1/17/2022 | |
2.4.7.1 | 1,644 | 1/13/2022 | |
2.4.7 | 1,648 | 1/12/2022 | |
2.4.6.5 | 1,765 | 1/6/2022 | |
2.4.6.4 | 1,626 | 1/4/2022 | |
2.4.6.3 | 1,710 | 1/4/2022 | |
2.4.6.2 | 1,601 | 1/4/2022 | |
2.4.6.1 | 1,776 | 12/29/2021 | |
2.4.6 | 1,838 | 12/29/2021 | |
2.4.5.5 | 3,696 | 12/8/2021 | |
2.4.5.3 | 2,784 | 11/23/2021 | |
2.4.5.2 | 2,637 | 11/9/2021 | |
2.4.5.1 | 2,381 | 11/4/2021 | |
2.4.4.8 | 2,447 | 10/16/2021 | |
2.4.4.7 | 1,915 | 9/29/2021 | |
2.4.4.6 | 11,351 | 9/24/2021 | |
2.4.4.5 | 1,680 | 9/24/2021 | |
2.4.4.4 | 2,023 | 9/17/2021 | |
2.4.4.3 | 1,629 | 9/17/2021 | |
2.4.4.2 | 1,583 | 9/17/2021 | |
2.4.4.1 | 1,958 | 9/7/2021 | |
2.4.4 | 1,608 | 9/6/2021 | |
2.4.3.9 | 7,568 | 8/10/2021 | |
2.4.3.8 | 1,887 | 8/3/2021 | |
2.4.3.7 | 2,669 | 7/8/2021 | |
2.4.3.6 | 1,895 | 6/25/2021 | |
2.4.3.5 | 2,455 | 5/18/2021 | |
2.4.3.4 | 61,498 | 5/6/2021 | |
2.4.3.3 | 1,840 | 4/17/2021 | |
2.4.3.2 | 1,885 | 4/2/2021 | |
2.4.3.1 | 1,656 | 4/1/2021 | |
2.4.3 | 2,597 | 3/26/2021 | |
2.4.2.10 | 1,764 | 3/26/2021 | |
2.4.2.9 | 1,787 | 3/23/2021 | |
2.4.2.8 | 1,734 | 3/19/2021 | |
2.4.2.7 | 1,909 | 3/11/2021 | |
2.4.2.6 | 1,743 | 3/10/2021 | |
2.4.2.5 | 1,757 | 3/6/2021 | |
2.4.2.4 | 1,930 | 2/26/2021 | |
2.4.2.3 | 1,755 | 2/19/2021 | |
2.4.2.1 | 1,850 | 1/26/2021 | |
2.4.2 | 1,861 | 1/23/2021 | |
2.4.1.5 | 1,954 | 1/12/2021 | |
2.4.1.4 | 1,708 | 1/11/2021 | |
2.4.1.3 | 1,872 | 12/25/2020 | |
2.4.1.2 | 1,964 | 12/18/2020 | |
2.4.1.1 | 7,104 | 12/11/2020 | |
2.4.1 | 1,942 | 11/17/2020 | |
2.4.0 | 1,984 | 11/11/2020 | |
2.3.2.6 | 1,961 | 11/10/2020 | |
2.3.2.5 | 1,845 | 11/10/2020 | |
2.3.2.4 | 1,813 | 11/10/2020 | |
2.3.2.3 | 1,715 | 11/10/2020 | |
2.3.2.2 | 1,802 | 11/3/2020 | |
2.3.2.1 | 1,757 | 11/3/2020 | |
2.3.2 | 2,482 | 10/28/2020 | |
2.3.1.10 | 2,030 | 9/28/2020 | |
2.3.1.9 | 1,827 | 9/27/2020 | |
2.3.1.8 | 1,745 | 9/22/2020 | |
2.3.1.7 | 1,855 | 9/20/2020 | |
2.3.1.6 | 1,768 | 9/17/2020 | |
2.3.1.6-preview | 1,154 | 9/17/2020 | |
2.3.1.5 | 1,853 | 9/11/2020 | |
2.3.1.4 | 1,901 | 9/3/2020 | |
2.3.1.3 | 1,818 | 9/3/2020 | |
2.3.1.1 | 2,051 | 8/21/2020 | |
2.3.1 | 1,837 | 8/19/2020 | |
2.3.0 | 1,829 | 8/18/2020 | |
2.2.9.6 | 1,796 | 8/17/2020 | |
2.2.9.5 | 1,903 | 8/11/2020 | |
2.2.9.4 | 1,805 | 8/11/2020 | |
2.2.9.3 | 1,871 | 8/6/2020 | |
2.2.9.2 | 1,976 | 8/1/2020 | |
2.2.9.1 | 1,980 | 7/14/2020 | |
2.2.9 | 1,777 | 7/13/2020 | |
2.2.8.9 | 2,284 | 5/2/2020 | |
2.2.8.8 | 16,845 | 4/15/2020 | |
2.2.8.7 | 1,807 | 4/15/2020 | |
2.2.8.6 | 1,976 | 3/22/2020 | |
2.2.8.5 | 1,766 | 3/20/2020 | |
2.2.8.4 | 1,958 | 3/1/2020 | |
2.2.8.3 | 1,933 | 2/29/2020 | |
2.2.8.2 | 1,908 | 1/16/2020 | |
2.2.8.1 | 1,866 | 1/13/2020 | |
2.2.8 | 1,789 | 1/4/2020 | |
2.2.7.6 | 1,840 | 12/20/2019 | |
2.2.7.4 | 1,910 | 12/16/2019 | |
2.2.7.3 | 2,086 | 10/30/2019 | |
2.2.7.1 | 1,818 | 10/29/2019 | |
2.2.7 | 1,856 | 10/20/2019 | |
2.2.6.4 | 2,713 | 10/16/2019 | |
2.2.6.3 | 2,851 | 8/2/2019 | |
2.2.6.2 | 2,747 | 6/9/2019 | |
2.2.6.1 | 2,727 | 4/27/2019 | |
2.2.6 | 2,560 | 4/9/2019 | |
2.2.5.1 | 2,803 | 3/28/2019 | |
2.2.5 | 2,612 | 3/20/2019 | |
2.2.4.6 | 2,766 | 2/10/2019 | |
2.2.4.5 | 2,743 | 1/28/2019 | |
2.2.4.4 | 2,669 | 1/27/2019 | |
2.2.4.3 | 2,709 | 1/25/2019 | |
2.2.4 | 2,763 | 1/19/2019 | |
2.2.3.5 | 2,766 | 1/18/2019 | |
2.2.3.4 | 2,707 | 1/6/2019 | |
2.2.3.3 | 2,722 | 1/3/2019 | |
2.2.3.1 | 2,768 | 1/3/2019 | |
2.2.3 | 2,776 | 1/2/2019 | |
2.2.2.2 | 2,874 | 1/2/2019 | |
2.2.2.1 | 2,768 | 1/2/2019 | |
2.2.2 | 2,699 | 12/31/2018 | |
2.2.0 | 3,263 | 12/29/2018 | |
2.1.6.1 | 2,736 | 12/25/2018 | |
2.1.6 | 2,607 | 12/25/2018 | |
2.1.5.2 | 2,640 | 12/24/2018 | |
2.1.5.1 | 2,896 | 12/22/2018 | |
2.1.5 | 2,854 | 12/21/2018 | |
2.1.4.3 | 2,972 | 12/15/2018 | |
2.1.4.2 | 2,642 | 12/15/2018 | |
2.1.4.1 | 2,834 | 11/30/2018 | |
2.1.4 | 2,672 | 11/27/2018 | |
2.1.3.1 | 2,753 | 11/23/2018 | |
2.1.3 | 2,632 | 11/20/2018 | |
2.1.2.1 | 2,746 | 11/9/2018 | |
2.1.2 | 2,753 | 11/9/2018 | |
2.1.1.1 | 2,829 | 10/30/2018 | |
2.1.1 | 3,186 | 9/22/2018 | |
2.1.0 | 2,921 | 9/6/2018 | |
2.0.1 | 2,989 | 7/26/2018 | |
2.0.0 | 3,010 | 7/26/2018 | |
1.9.11 | 3,003 | 7/10/2018 | |
1.9.10 | 2,990 | 6/27/2018 | |
1.9.9 | 3,015 | 6/6/2018 | |
1.9.8 | 3,029 | 5/9/2018 | |
1.9.7.4 | 3,239 | 4/21/2018 | |
1.9.7.3 | 3,129 | 4/21/2018 | |
1.9.7.2 | 3,242 | 4/21/2018 | |
1.9.7.1 | 3,034 | 4/16/2018 | |
1.9.7 | 2,932 | 4/16/2018 | |
1.9.6 | 3,079 | 4/14/2018 | |
1.9.5.4 | 2,989 | 4/2/2018 | |
1.9.5.3 | 3,030 | 4/2/2018 | |
1.9.5.2 | 3,036 | 4/1/2018 | |
1.9.5.1 | 3,060 | 3/31/2018 | |
1.9.5 | 3,183 | 3/25/2018 | |
1.9.4.1 | 3,096 | 3/17/2018 | |
1.9.4 | 3,000 | 3/17/2018 | |
1.9.3.3 | 3,029 | 3/14/2018 | |
1.9.3.2 | 3,054 | 3/13/2018 | |
1.9.3.1 | 3,114 | 3/11/2018 | |
1.9.3 | 3,170 | 3/11/2018 | |
1.9.2 | 3,152 | 3/11/2018 | |
1.9.1.4 | 3,084 | 3/9/2018 | |
1.9.1.3 | 3,052 | 3/9/2018 | |
1.9.1.2 | 3,178 | 3/8/2018 | |
1.9.1.1 | 3,011 | 3/8/2018 | |
1.9.1 | 2,739 | 3/8/2018 | |
1.9.0 | 3,096 | 3/7/2018 | |
1.8.9.1 | 2,294 | 3/3/2018 | |
1.8.9 | 2,340 | 2/20/2018 | |
1.8.8 | 2,390 | 2/3/2018 | |
1.8.7 | 2,683 | 1/13/2018 | |
1.8.6 | 2,420 | 1/10/2018 | |
1.8.5 | 2,530 | 1/9/2018 | |
1.8.4 | 2,462 | 1/9/2018 | |
1.8.3 | 2,261 | 1/8/2018 | |
1.8.2 | 2,454 | 1/5/2018 | |
1.8.1 | 2,546 | 1/5/2018 | |
1.8.0 | 2,376 | 12/22/2017 | |
1.7.9 | 2,544 | 12/8/2017 | |
1.7.7 | 2,232 | 11/18/2017 | |
1.0.0 | 2,237 | 8/23/2017 |
如有问题请联系QQ:1170397736,或者到项目的github反馈问题,详细的API文档在github上:https://github.com/ldqk/Masuit.Tools