WeNerds.Filters
1.0.2
dotnet add package WeNerds.Filters --version 1.0.2
NuGet\Install-Package WeNerds.Filters -Version 1.0.2
<PackageReference Include="WeNerds.Filters" Version="1.0.2" />
<PackageVersion Include="WeNerds.Filters" Version="1.0.2" />
<PackageReference Include="WeNerds.Filters" />
paket add WeNerds.Filters --version 1.0.2
#r "nuget: WeNerds.Filters, 1.0.2"
#:package WeNerds.Filters@1.0.2
#addin nuget:?package=WeNerds.Filters&version=1.0.2
#tool nuget:?package=WeNerds.Filters&version=1.0.2
WE Filters
Open-source Commons Filters developed to facilitate the creation of a new project in .Net, providing some commons middlewares.
- 👉 Nuget Package -
nuget page
Something is missing? Submit a new
product feature requestusing the issues tracker..
✨ Using the library
👉 Step 1 - Install library into project
- Package Manager
$ Install-Package WeNerds.Filters
- .Net CLI
$ dotnet add package WeNerds.Filters
👉 Step 2 - Using the Filters<br> In the topics of each filter available in the package, how to register will be explained.
✨ About the Filters
WeResultHandlerFilter
This filter will be responsible for ensuring that in each response, if there is a message in WeNotification, the API response is modified.
Therefore, if there is any record in WeNotification, regardless of the value in the response, it will be manipulated following the following rule:
- Will always return an object of type WeResponse<IEnumerable<WeNotification>>
- The Success field will have the value false
- The Data field will contain a list of WeNotification
- The request StatusCode may be as follows: 403, 401, 404, 400
- The priority is exactly this, that is, if the message list has at least one Status403Forbidden message, the request status will be 403, otherwise it checks if there is at least one Status401Unauthorized message, if it has the request status it will be 401, and so on until it reaches status 400.
Important:
For correct operation, this filter depends on the WeNotification service also being used.
How to use?
How this filter works is very simple, just register it in program.cs and that's it.
builder.Services.AddControllersWithViews(options =>
{
options.Filters.Add<WeResultHandlerFilter>();
});
✨ Contacts
📧 Email - leo.cavalheiro.ti@gmail.com
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. |
-
net8.0
- Microsoft.AspNetCore.Mvc (>= 2.2.0)
- WeNerds.Models (>= 1.0.2)
- WeNerds.Services (>= 1.0.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.