RequestDelegateFactory.Create Method

Definition

Overloads

Create(Delegate, RequestDelegateFactoryOptions)

Creates a RequestDelegate implementation for handler.

Create(MethodInfo, Func<HttpContext,Object>, RequestDelegateFactoryOptions)

Creates a RequestDelegate implementation for methodInfo.

Create(Delegate, RequestDelegateFactoryOptions)

Creates a RequestDelegate implementation for handler.

public static Microsoft.AspNetCore.Http.RequestDelegateResult Create (Delegate handler, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions? options = default);
static member Create : Delegate * Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions -> Microsoft.AspNetCore.Http.RequestDelegateResult
Public Shared Function Create (handler As Delegate, Optional options As RequestDelegateFactoryOptions = Nothing) As RequestDelegateResult

Parameters

handler
Delegate

A request handler with any number of custom parameters that often produces a response with its return value.

options
RequestDelegateFactoryOptions

The RequestDelegateFactoryOptions used to configure the behavior of the handler.

Returns

RequestDelegateResult

The RequestDelegateResult.

Applies to

Create(MethodInfo, Func<HttpContext,Object>, RequestDelegateFactoryOptions)

Creates a RequestDelegate implementation for methodInfo.

public static Microsoft.AspNetCore.Http.RequestDelegateResult Create (System.Reflection.MethodInfo methodInfo, Func<Microsoft.AspNetCore.Http.HttpContext,object>? targetFactory = default, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions? options = default);
static member Create : System.Reflection.MethodInfo * Func<Microsoft.AspNetCore.Http.HttpContext, obj> * Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions -> Microsoft.AspNetCore.Http.RequestDelegateResult
Public Shared Function Create (methodInfo As MethodInfo, Optional targetFactory As Func(Of HttpContext, Object) = Nothing, Optional options As RequestDelegateFactoryOptions = Nothing) As RequestDelegateResult

Parameters

methodInfo
MethodInfo

A request handler with any number of custom parameters that often produces a response with its return value.

targetFactory
Func<HttpContext,Object>

Creates the this for the non-static method.

options
RequestDelegateFactoryOptions

The RequestDelegateFactoryOptions used to configure the behavior of the handler.

Returns

RequestDelegateResult

The RequestDelegate.

Applies to