Skip to content

IDurableTaskCompletionSource<T> Methods

Represents a task completion source whose terminal state is recorded in a journal.

TrySetCanceled

abstract
public abstract bool TrySetCanceled()
Attempts to transition the durable state to canceled.

Returns

true if the state was transitioned; otherwise, false.

TrySetException(Exception)

abstract
public abstract bool TrySetException(Exception exception)
Attempts to transition the durable state to faulted with the specified exception.

Parameters

exceptionException
The exception which faults the task.

Returns

true if the state was transitioned; otherwise, false.

TrySetResult(T)

abstract
public abstract bool TrySetResult(T value)
Attempts to transition the durable state to completed with the specified result.

Parameters

valueT
The task result.

Returns

true if the state was transitioned; otherwise, false.