Nocpad.AspNetCore.MinimalEndpoints.SourceGenerator
1.0.0
Suggested Alternatives
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Nocpad.AspNetCore.MinimalEndpoints.SourceGenerator --version 1.0.0
NuGet\Install-Package Nocpad.AspNetCore.MinimalEndpoints.SourceGenerator -Version 1.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="Nocpad.AspNetCore.MinimalEndpoints.SourceGenerator" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nocpad.AspNetCore.MinimalEndpoints.SourceGenerator" Version="1.0.0" />
<PackageReference Include="Nocpad.AspNetCore.MinimalEndpoints.SourceGenerator" />
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 Nocpad.AspNetCore.MinimalEndpoints.SourceGenerator --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Nocpad.AspNetCore.MinimalEndpoints.SourceGenerator, 1.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 Nocpad.AspNetCore.MinimalEndpoints.SourceGenerator@1.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=Nocpad.AspNetCore.MinimalEndpoints.SourceGenerator&version=1.0.0
#tool nuget:?package=Nocpad.AspNetCore.MinimalEndpoints.SourceGenerator&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
A source generator that can be used along with the Nocpad.AspNetCore.MinimalEndpoints
package to automatically generate the boilerplate code required to map endpoints.
Examples
Endpoint associated with a group
using Nocpad.AspNetCore.MinimalEndpoints; // you may add a global using statement
internal sealed class WeatherEndpointGroup : IEndpointGroupConfiguration
{
public static string Route => "api/weather";
public static string Name => "Weather";
public static void Configure(RouteGroupBuilder group) => group.RequireAuthorization();
}
internal sealed class GetWeather : IEndpointConfiguration<WeatherGroup>
{
internal static void Configure(RouteHandlerBuilder builder)
{
// endpoint configuration
}
[Get("forecast")]
internal static WeatherForecast[] Get()
{
// implementation...
}
}
Simple endpoint without a group/configuration
internal sealed class Upload : IEndpoint
{
[Post("/file-upload")]
public static IResult Handle(IFormFile file) => Results.Ok(new { file.FileName, file.ContentType, file.Length });
}
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
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 |
---|