Share via


IDurableEntityContext.DispatchAsync<T>(Object[]) Method

Definition

Dynamically dispatches the incoming entity operation using reflection.

public System.Threading.Tasks.Task DispatchAsync<T> (params object[] constructorParameters) where T : class;
abstract member DispatchAsync : obj[] -> System.Threading.Tasks.Task (requires 'T : null)
Public Function DispatchAsync(Of T As Class) (ParamArray constructorParameters As Object()) As Task

Type Parameters

T

The class to use for entity instances.

Parameters

constructorParameters
Object[]

Parameters to feed to the entity constructor. Should be primarily used for output bindings. Parameters must match the order in the constructor after ignoring parameters populated on constructor via dependency injection.

Returns

A task that completes when the dispatched operation has finished.

Exceptions

If there is more than one method with the given operation name.

If there is no method with the given operation name.

If the method has more than one argument.

Remarks

If the entity's state is null, an object of type T is created first. Then, reflection is used to try to find a matching method. This match is based on the method name (which is the operation name) and the argument list (which is the operation content, deserialized into an object array).

Applies to