EffectRunnerExtensions Type
Creates endpoints from effects with curried route handlers, which are checked against the route format's values
when compiling. It works with the same runners and MapEffectEndpoints as Orsak.AspNetCore.
Static members
| Static member |
Description
|
Full Usage:
EffectRunnerExtensions.RouteGet2(this, path, routeHandler)
Parameters:
^H
-
The runner, which turns the handler's effect into a request delegate
path : PrintfFormat<'Printer, unit, unit, ^Eff, ^T>
-
The route, with format specifiers for the route values
routeHandler : Expr<^Handler>
-
Creates the effect that handles a request, from the route values
Returns: Endpoint
Modifiers: inline Type parameters: ^H, ^Eff, 'Printer, ^T, ^Handler (requires (static member op_MultiplyGreaterGreater : ^Eff * ^H -> Microsoft.AspNetCore.Http.RequestDelegate) and (static member op_MultiplyGreaterGreater : ^Eff * ^H -> Microsoft.AspNetCore.Http.RequestDelegate) and (static member op_MultiplyGreaterGreater : ^Eff * ^H -> Microsoft.AspNetCore.Http.RequestDelegate) and (static member Apply : ^Handler * ^T * Microsoft.FSharp.Core.obj Microsoft.FSharp.Core.array * Orsak.AspNetCore.V2.RouteHandler -> ^Eff)) |
Creates a GET endpoint for path, handled by routeHandler, a curried
function of the route values:
The format specifiers are the same as for
Example
val getOrderLine: orderId: int -> line: int -> 'a
val orderId: int
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int val line: int
|
Orsak