Class DeadlineRouterExtensions
- Namespace
- IceRpc
- Assembly
- IceRpc.Deadline.dll
Provides an extension method for Router to add the deadline middleware.
public static class DeadlineRouterExtensions
- Inheritance
-
DeadlineRouterExtensions
- Inherited Members
Methods
UseDeadline(Router)
Adds a DeadlineMiddleware to this router.
public static Router UseDeadline(this Router router)
Parameters
router
RouterThe router being configured.
Returns
- Router
The router being configured.
Examples
The following code adds the deadline middleware to the dispatch pipeline.
// Create a router (dispatch pipeline) and install the deadline middleware.
Router router = new Router()
.UseDeadline()
.Map<IGreeterService>(new Chatbot());
await using var server = new Server(router);
server.Listen();