Skip to content

DurableTaskContext.TryGetCurrent(DurableTaskContext?)

TryGetCurrent(DurableTaskContext?)

static
View source
public static bool TryGetCurrent(out DurableTaskContext? context)
Gets the context of the durable task which the calling code runs in, if any.

Parameters

contextDurableTaskContext?
The running task's context, or null outside a durable task.

Returns

true when the calling code runs in a durable task.