Skip to content

DurableHttpEndpointRouteBuilderExtensions Methods

Makes route groups serve durable operations: long-running HTTP operations which durable tasks perform.

MapDurableSignal(IEndpointRouteBuilder, DurableSignal<T>)

staticextension
View source
public static IEndpointConventionBuilder MapDurableSignal<T>(this IEndpointRouteBuilder endpoints, DurableSignal<T> signal)
Maps POST {group}/operations/{operationId}/signals/{name}, in a group which DurableHttpEndpointRouteBuilderExtensions configures, which delivers signal with the JSON request body as its value to an operation's work.

Parameters

endpointsIEndpointRouteBuilder
The group.
signalDurableSignal<T>
The signal, whose name completes the route.

Returns

A builder which configures the endpoint.

Exceptions

System.ArgumentException
The signal's name has characters other than URL-unreserved ones.

WithDurableOperations(RouteGroupBuilder, string)

staticextension
View source
public static RouteGroupBuilder WithDurableOperations(this RouteGroupBuilder group, string scope)
Makes the group's endpoints which return durable work start operations, and maps the endpoints which serve the group's operations under {group}/operations.

Parameters

groupRouteGroupBuilder
The route group, such as app.MapGroup("/orders/{orderId}").
scopestring
The scope of the group's operations, such as orders, which is part of every operation's key, so it stays equal while the group's routes change. Groups, and Nexus services, with equal scopes and route values address the same operations.

Returns

The group, which maps the group's durable starts and signals, and configures its endpoints.

Exceptions

System.ArgumentException
scope is empty.