RemoteEndpoints Type
Serves the members of an interface to remote clients, such as the proxies RemoteClient calls.
Static members
| Static member |
Description
|
Full Usage:
RemoteEndpoints.MapRemote(endpoints, prefix, formats, create)
Parameters:
IEndpointRouteBuilder
-
The endpoints to add to
prefix : string
-
The path the members' routes start with, such as /api
formats : IWireFormat list
-
The formats the endpoints read and write, chosen by content type
create : HttpContext -> 'Api
-
Makes the implementation that answers a request, such as one running effects in an
environment of the request
Returns: RouteGroupBuilder
The group of the endpoints, so authorization and other conventions can be added to all of them
Type parameters: 'Api |
Maps each member of
A member's CancellationToken isn't read from the request: the request's RequestAborted is passed in its place,
and an Async is started with it, so a call stops when its client cancels it or goes away, which is logged at
the debug level and not answered.
The members may return a Task, a ValueTask or an Async, of a value or of none. Reflection finds them, so nothing is
generated for the server. The formats' codecs for each member are made here, once, so a type a format can't
write fails when the endpoints are mapped, as the application starts, rather than on a call. A member's
attributes are its endpoint's metadata, so
Example
|
Orsak