Method Create
Create(Func<HttpRequest, HttpContext, Task<HttpResponse?>>, RequestHandlerExecutionMode)
Gets an inline AsyncRequestHandler that resolves to the specified function.
public static AsyncRequestHandler Create(Func<HttpRequest, HttpContext, Task<HttpResponse?>> execute, RequestHandlerExecutionMode executionMode = RequestHandlerExecutionMode.BeforeResponse)
Parameters
execute
Func<HttpRequest, HttpContext, Task<HttpResponse>>The function that the AsyncRequestHandler will run.
executionMode
RequestHandlerExecutionModeOptional. Determines where the request handler will be executed.