ToolNET.WebApi.Filter
6.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ToolNET.WebApi.Filter --version 6.0.0
NuGet\Install-Package ToolNET.WebApi.Filter -Version 6.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ToolNET.WebApi.Filter" Version="6.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ToolNET.WebApi.Filter" Version="6.0.0" />
<PackageReference Include="ToolNET.WebApi.Filter" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ToolNET.WebApi.Filter --version 6.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ToolNET.WebApi.Filter, 6.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ToolNET.WebApi.Filter@6.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ToolNET.WebApi.Filter&version=6.0.0
#tool nuget:?package=ToolNET.WebApi.Filter&version=6.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
1.过滤器使用说明
GlobalExceptionFilter 全局异常处理过滤器
LoggerFilter 日志记录过滤器
ModelValidatorFilter 模型参数验证过滤器
// 必须依赖内存服务
builder.Services.AddMemoryCache();
// 添加全局过滤器
builder.Services.AddControllers(options =>
{
options.AddFilters(); // 方法内部添加了 ModelValidatorFilter/LoggerFilter/GlobalExceptionFilter
// 下面可以引用其他过滤器
});
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Microsoft.AspNetCore.Mvc.Core (>= 2.2.5)
- Microsoft.AspNetCore.Mvc.Formatters.Json (>= 2.2.0)
- Microsoft.Extensions.Caching.Memory (>= 8.0.0-preview.4.23259.5)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on ToolNET.WebApi.Filter:
| Package | Downloads |
|---|---|
|
ToolNET.WebApi.SDK
球域相遇--整合资源包 ToolNET.Swagger.Knife4j ToolNET.WebApi.Cors ToolNET.WebApi.Filter ToolNET.WebApi.Jwt ToolNET.WebApi.Middleware ToolNET.WebApi.SDK |
|
|
ToolNET.Infrastructure.WebFilters
日志过滤器/全局异常过滤器 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.1.5 | 765 | 10/28/2024 |
| 7.1.4 | 270 | 10/22/2024 |
| 7.1.3 | 278 | 10/18/2024 |
| 7.1.2 | 455 | 8/21/2024 |
| 7.1.1 | 229 | 8/21/2024 |
| 7.1.0 | 483 | 6/15/2024 |
| 7.0.9 | 210 | 6/11/2024 |
| 7.0.8 | 298 | 4/30/2024 |
| 7.0.6 | 215 | 4/30/2024 |
| 7.0.4 | 371 | 2/26/2024 |
| 7.0.3 | 198 | 2/23/2024 |
| 7.0.2 | 213 | 2/23/2024 |
| 7.0.1 | 207 | 2/23/2024 |
| 7.0.0 | 197 | 1/26/2024 |
| 6.0.0 | 201 | 6/12/2023 |
| 5.0.8 | 313 | 4/20/2023 |
| 5.0.7 | 287 | 4/20/2023 |
| 5.0.5 | 607 | 9/14/2022 |
| 5.0.4 | 526 | 9/7/2022 |
| 5.0.3 | 567 | 8/22/2022 |
| 5.0.2 | 611 | 6/15/2022 |
| 5.0.0 | 583 | 4/24/2022 |