Class MainExtensions
provides extensions to easily bootstrap fastendpoints in the asp.net middleware pipeline
Inherited Members
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public static class MainExtensions
Methods
AddFastEndpoints(IServiceCollection, Action<EndpointDiscoveryOptions>?)
adds the FastEndpoints services to the ASP.Net middleware pipeline
Declaration
public static IServiceCollection AddFastEndpoints(this IServiceCollection services, Action<EndpointDiscoveryOptions>? options = null)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | |
Action<EndpointDiscoveryOptions> | options | optionally specify the endpoint discovery options |
Returns
Type | Description |
---|---|
IServiceCollection |
MapFastEndpoints(IEndpointRouteBuilder, Action<Config>?)
Declaration
public static IEndpointRouteBuilder MapFastEndpoints(this IEndpointRouteBuilder app, Action<Config>? configAction = null)
Parameters
Type | Name | Description |
---|---|---|
IEndpointRouteBuilder | app | |
Action<Config> | configAction |
Returns
Type | Description |
---|---|
IEndpointRouteBuilder |
UseFastEndpoints(IApplicationBuilder, Action<Config>?)
finalizes auto discovery of endpoints and prepares FastEndpoints to start processing requests
HINT: you can use MapFastEndpoints(IEndpointRouteBuilder, Action<Config>?) instead of this method if you have some special requirement such as using "Startup.cs", etc.
Declaration
public static IApplicationBuilder UseFastEndpoints(this IApplicationBuilder app, Action<Config>? configAction = null)
Parameters
Type | Name | Description |
---|---|---|
IApplicationBuilder | app | |
Action<Config> | configAction | an optional action to configure FastEndpoints |
Returns
Type | Description |
---|---|
IApplicationBuilder |
Exceptions
Type | Condition |
---|---|
InvalidCastException | thrown when the |