Table of Contents

Method Create

Namespace
Sisk.Core.Routing
Assembly
Sisk.Core.dll

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 RequestHandlerExecutionMode

Optional. Determines where the request handler will be executed.

Returns

AsyncRequestHandler