ResponsesCancellationSignalProvider Class

Definition

Provides cancellation signalling for in-flight responses. Extend this class to back cancellation with a custom signalling mechanism (e.g., distributed pub/sub, Redis, message queue).

public abstract class ResponsesCancellationSignalProvider
type ResponsesCancellationSignalProvider = class
Public MustInherit Class ResponsesCancellationSignalProvider
Inheritance
ResponsesCancellationSignalProvider

Remarks

When no custom implementation is registered, the SDK provides an in-memory default that is automatically registered by AddResponsesServer().

Constructors

Name Description
ResponsesCancellationSignalProvider()

Methods

Name Description
CancelResponseAsync(String, CancellationToken)

Signals cancellation for an in-flight response. This method is fire-and-forget safe — it may return before the handler observes the cancellation.

GetResponseCancellationTokenAsync(String, CancellationToken)

Returns a CancellationToken that fires when CancelResponseAsync(String, CancellationToken) is called for the given response.

Applies to