EndpointFilterExtensions.AddEndpointFilter Method

Definition

Overloads

AddEndpointFilter<TBuilder,TFilterType>(TBuilder)

Registers a filter of type TFilterType onto the route handler.

AddEndpointFilter<TBuilder>(TBuilder, IEndpointFilter)

Registers a filter onto the route handler.

AddEndpointFilter<TBuilder>(TBuilder, Func<EndpointFilterInvocationContext,EndpointFilterDelegate,ValueTask<Object>>)

Registers a filter given a delegate onto the route handler.

AddEndpointFilter<TFilterType>(RouteHandlerBuilder)

Registers a filter of type TFilterType onto the route handler.

AddEndpointFilter<TFilterType>(RouteGroupBuilder)

Registers a filter of type TFilterType onto the route handler.

AddEndpointFilter<TBuilder,TFilterType>(TBuilder)

Registers a filter of type TFilterType onto the route handler.

public static TBuilder AddEndpointFilter<TBuilder,TFilterType> (this TBuilder builder) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder where TFilterType : Microsoft.AspNetCore.Http.IEndpointFilter;
static member AddEndpointFilter : 'Builder -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder and 'FilterType :> Microsoft.AspNetCore.Http.IEndpointFilter)
<Extension()>
Public Function AddEndpointFilter(Of TBuilder As IEndpointConventionBuilder, TFilterType As IEndpointConventionBuilder) (builder As TBuilder) As TBuilder

Type Parameters

TBuilder

The type of the IEndpointConventionBuilder to configure.

TFilterType

The type of the IEndpointFilter to register.

Parameters

builder
TBuilder

The RouteHandlerBuilder.

Returns

TBuilder

A RouteHandlerBuilder that can be used to further customize the route handler.

Applies to

AddEndpointFilter<TBuilder>(TBuilder, IEndpointFilter)

Registers a filter onto the route handler.

public static TBuilder AddEndpointFilter<TBuilder> (this TBuilder builder, Microsoft.AspNetCore.Http.IEndpointFilter filter) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member AddEndpointFilter : 'Builder * Microsoft.AspNetCore.Http.IEndpointFilter -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function AddEndpointFilter(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, filter As IEndpointFilter) As TBuilder

Type Parameters

TBuilder

Parameters

builder
TBuilder

The RouteHandlerBuilder.

filter
IEndpointFilter

The IEndpointFilter to register.

Returns

TBuilder

A RouteHandlerBuilder that can be used to further customize the route handler.

Applies to

AddEndpointFilter<TBuilder>(TBuilder, Func<EndpointFilterInvocationContext,EndpointFilterDelegate,ValueTask<Object>>)

Registers a filter given a delegate onto the route handler.

public static TBuilder AddEndpointFilter<TBuilder> (this TBuilder builder, Func<Microsoft.AspNetCore.Http.EndpointFilterInvocationContext,Microsoft.AspNetCore.Http.EndpointFilterDelegate,System.Threading.Tasks.ValueTask<object?>> routeHandlerFilter) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member AddEndpointFilter : 'Builder * Func<Microsoft.AspNetCore.Http.EndpointFilterInvocationContext, Microsoft.AspNetCore.Http.EndpointFilterDelegate, System.Threading.Tasks.ValueTask<obj>> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function AddEndpointFilter(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, routeHandlerFilter As Func(Of EndpointFilterInvocationContext, EndpointFilterDelegate, ValueTask(Of Object))) As TBuilder

Type Parameters

TBuilder

Parameters

builder
TBuilder

The RouteHandlerBuilder.

routeHandlerFilter
Func<EndpointFilterInvocationContext,EndpointFilterDelegate,ValueTask<Object>>

A method representing the core logic of the filter.

Returns

TBuilder

A RouteHandlerBuilder that can be used to further customize the route handler.

Applies to

AddEndpointFilter<TFilterType>(RouteHandlerBuilder)

Registers a filter of type TFilterType onto the route handler.

public static Microsoft.AspNetCore.Builder.RouteHandlerBuilder AddEndpointFilter<TFilterType> (this Microsoft.AspNetCore.Builder.RouteHandlerBuilder builder) where TFilterType : Microsoft.AspNetCore.Http.IEndpointFilter;
static member AddEndpointFilter : Microsoft.AspNetCore.Builder.RouteHandlerBuilder -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder (requires 'FilterType :> Microsoft.AspNetCore.Http.IEndpointFilter)
<Extension()>
Public Function AddEndpointFilter(Of TFilterType As IEndpointFilter) (builder As RouteHandlerBuilder) As RouteHandlerBuilder

Type Parameters

TFilterType

The type of the IEndpointFilter to register.

Parameters

Returns

A RouteHandlerBuilder that can be used to further customize the route handler.

Applies to

AddEndpointFilter<TFilterType>(RouteGroupBuilder)

Registers a filter of type TFilterType onto the route handler.

public static Microsoft.AspNetCore.Routing.RouteGroupBuilder AddEndpointFilter<TFilterType> (this Microsoft.AspNetCore.Routing.RouteGroupBuilder builder) where TFilterType : Microsoft.AspNetCore.Http.IEndpointFilter;
static member AddEndpointFilter : Microsoft.AspNetCore.Routing.RouteGroupBuilder -> Microsoft.AspNetCore.Routing.RouteGroupBuilder (requires 'FilterType :> Microsoft.AspNetCore.Http.IEndpointFilter)
<Extension()>
Public Function AddEndpointFilter(Of TFilterType As IEndpointFilter) (builder As RouteGroupBuilder) As RouteGroupBuilder

Type Parameters

TFilterType

The type of the IEndpointFilter to register.

Parameters

Returns

A RouteHandlerBuilder that can be used to further customize the route handler.

Applies to