It seems we missed a mistake in #511 in class AsyncFrom<TTriggerType> such that a call to the async method ExecuteAsync would invoke the synchronous Execute, which intentionally throws an InvalidOperationException.
Additionally, the implementation of AsyncFrom<TTriggerType>.ExecuteAsync(Transition, object[]) does not return the task queued to execute the entry action, and instead returns Task.CompletedTask, making it impossible for the caller to await completion of the entry action.
This PR changes ExecuteAsync so that it invokes the async action and returns the queued task.
Proposed resolution for issue #531.
It seems we missed a mistake in #511 in class
AsyncFrom<TTriggerType>
such that a call to the async methodExecuteAsync
would invoke the synchronousExecute
, which intentionally throws anInvalidOperationException
.Additionally, the implementation of
AsyncFrom<TTriggerType>.ExecuteAsync(Transition, object[])
does not return the task queued to execute the entry action, and instead returnsTask.CompletedTask
, making it impossible for the caller toawait
completion of the entry action.This PR changes
ExecuteAsync
so that it invokes the async action and returns the queued task.