RequestDelegateFactory.Create Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Create(Delegate, RequestDelegateFactoryOptions) |
Creates a RequestDelegate implementation for |
| Create(MethodInfo, Func<HttpContext,Object>, RequestDelegateFactoryOptions) |
Creates a RequestDelegate implementation for |
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
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
The RequestDelegate.