NetCoreUsefullEndpoints 7.2023.219.2234
See the version list below for details.
dotnet add package NetCoreUsefullEndpoints --version 7.2023.219.2234
NuGet\Install-Package NetCoreUsefullEndpoints -Version 7.2023.219.2234
<PackageReference Include="NetCoreUsefullEndpoints" Version="7.2023.219.2234" />
paket add NetCoreUsefullEndpoints --version 7.2023.219.2234
#r "nuget: NetCoreUsefullEndpoints, 7.2023.219.2234"
// Install NetCoreUsefullEndpoints as a Cake Addin #addin nuget:?package=NetCoreUsefullEndpoints&version=7.2023.219.2234 // Install NetCoreUsefullEndpoints as a Cake Tool #tool nuget:?package=NetCoreUsefullEndpoints&version=7.2023.219.2234
NetCoreUsefullEndpoints
What it does
Register endpoints for
- See environment variables
- See current user ( implies authorization )
- See environment
- Throw error ( with ILogger or without )
- Current Date
- Digraph of current endpoints
- JSON of current endpoints
- Configuration View ( GetDebugView )
- Connection details ( remote ip address, local ip address...)
- Shutdown( and forced) the app ( use await app.RunAsync(UsefullExtensions.UsefullExtensions.cts.Token);
- See the start date of the application
Usage
Add this reference to your csproj in .NET 6
<ItemGroup>
<PackageReference Include="NetCoreUsefullEndpoints" Version="6.2022.1231.1100" />
</ItemGroup>
or in .NET 7
<ItemGroup>
<PackageReference Include="NetCoreUsefullEndpoints" Version="7.2023.126.700" />
</ItemGroup>
then use it in program.cs
using UsefullExtensions;
//code
var app = builder.Build();
app.MapUsefullAll();
//or for just some usefull
app.MapUsefullConfiguration();
For shutdown 418 please add
builder.Services.AddSingleton<MiddlewareShutdown>();
var app = builder.Build();
//ASAP
app.UseMiddleware<MiddlewareShutdown>();
The list of API endpoints is GET=>/api/usefull/date/start GET=>/api/usefull/date/startUTC GET=>/api/usefull/user/authorization GET=>/api/usefull/user/noAuthorization GET=>/api/usefull/environment GET=>/api/usefull/errorWithILogger GET=>/api/usefull/errorPure GET=>/api/usefull/date/now GET=>/api/usefull/date/nowUTC GET=>/api/usefull/endpoints/graph GET=>/api/usefull/endpoints/text GET=>/api/usefull/configuration GET=>/api/usefull/httpContext/Connection POST=>/api/usefull/shutdown POST=>/api/usefull/shutdownForced/{id} GET=>/WeatherForecast
Security
Each function has a default implementation with AllowAnonymous ( a part user ) and without put RequireCors ; If you want a special case here, call the functions with
app.MapUsefullAll("myCors", new string[] {"myAuthPolicy"});
//or
app.MapUsefullConfiguration();
For restarting , the last line should be
await app.RunAsync(UsefullExtensions.UsefullExtensions.cts.Token);
Enjoy!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- Microsoft.AspNetCore.OpenApi (>= 7.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.2024.906.1703 | 120 | 9/7/2024 |
8.2024.627.800 | 112 | 6/27/2024 |
7.2023.1216.1825 | 1,852 | 12/19/2023 |
7.2023.916.1715 | 358 | 9/16/2023 |
7.2023.402.1715 | 341 | 4/2/2023 |
7.2023.223.1815 | 1,536 | 2/23/2023 |
7.2023.219.2234 | 308 | 2/16/2023 |
7.2023.219.2134 | 293 | 2/15/2023 |
7.2023.219.2034 | 288 | 2/14/2023 |
7.2023.219.1934 | 372 | 2/10/2023 |
7.2023.219.841 | 314 | 2/10/2023 |
7.2023.207.2230 | 353 | 2/7/2023 |
7.2023.126.700 | 370 | 1/26/2023 |
7.2022.1231.1100 | 357 | 12/31/2022 |
7.2022.1203.1551 | 409 | 12/3/2022 |
6.2022.1231.1100 | 355 | 12/31/2022 |
6.2022.1203.1551 | 344 | 12/3/2022 |
6.2022.1026.2112 | 432 | 10/26/2022 |
6.2022.1012.712 | 630 | 10/12/2022 |
6.2022.722.712 | 521 | 7/22/2022 |
6.2022.721.1154 | 440 | 7/22/2022 |