Skip to content

DurableTaskReference<TResult>.CancelAsync(string?, CancellationToken)

CancelAsync(string?, CancellationToken)

View source
public ValueTask CancelAsync(string? reason, CancellationToken cancellationToken = default(CancellationToken))
Requests durable cancellation of the task carrying reason.

Parameters

reasonstring?
The reason which the task's DurableTaskContext reports, or null for none. The first request determines the reason.
cancellationTokenCancellationToken
A token which abandons waiting for the request to commit.