Skip to content

DurableTaskGrainExtensions.TryGetTarget(DurableTask, GrainId)

TryGetTarget(DurableTask, GrainId)

staticextension
View source
public static bool TryGetTarget(this DurableTask task, out GrainId target)
Gets the grain which a durable grain call targets, before the call is scheduled.

Parameters

taskDurableTask
The durable task definition.
targetGrainId
The grain which the call targets, when this method returns true; otherwise default.

Returns

true when task is a call to a grain's DurableTask-returning method, made through a grain reference and not yet scheduled; otherwise false, such as for a local definition like DurableTask or a reference to an existing task.

Exceptions

System.ArgumentNullException
task is null.