Class MainExtensions
provides extensions to easily bootstrap fastendpoints in the asp.net middleware pipeline
Inheritance
System.Object
MainExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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 |
---|---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection | services | |
System.Action<EndpointDiscoveryOptions> | options | optionally specify the endpoint discovery options |
Returns
Type | Description |
---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection |
MapFastEndpoints(IEndpointRouteBuilder, Action<Config>)
provides extensions to easily bootstrap fastendpoints in the asp.net middleware pipeline
Declaration
public static IEndpointRouteBuilder MapFastEndpoints(this IEndpointRouteBuilder app, Action<Config> configAction = null)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Routing.IEndpointRouteBuilder | app | |
System.Action<Config> | configAction |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Routing.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 |
---|---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | app | |
System.Action<Config> | configAction | an optional action to configure FastEndpoints |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder |
Exceptions
Type | Condition |
---|---|
System.InvalidCastException | thrown when the |