Search Results for

    Show / Hide Table of Contents

    Class MainExtensions

    provides extensions to easily bootstrap fastendpoints in the asp.net middleware pipeline

    Inheritance
    object
    MainExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    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
    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 app cannot be cast to IEndpointRouteBuilder

    In this article
    Back to top Developed by Đĵ ΝιΓΞΗΛψΚ and contributors / Licensed under MIT / Website generated by DocFX