Share via


ICancellationStrategy.IncomingRequestStarted Method

Definition

Associates the RequestId from an incoming request with the CancellationTokenSource that is used for the CancellationToken passed to that RPC method so it can be canceled later.

public void IncomingRequestStarted (StreamJsonRpc.RequestId requestId, System.Threading.CancellationTokenSource cancellationTokenSource);
abstract member IncomingRequestStarted : StreamJsonRpc.RequestId * System.Threading.CancellationTokenSource -> unit
Public Sub IncomingRequestStarted (requestId As RequestId, cancellationTokenSource As CancellationTokenSource)

Parameters

requestId
RequestId

The ID of the incoming request.

cancellationTokenSource
CancellationTokenSource

A means to cancel the CancellationToken that will be used when invoking the RPC server method.

Remarks

Implementations are expected to store the arguments in a dictionary so the implementing strategy can cancel it when the trigger occurs. The trigger is outside the scope of this interface and will vary by implementation.

Applies to