A new asynchronous invoke method overload (InvokeAsync) should be added in ObjectInvoker and all implementations of IObjectMember. As implied by its name, the goal is to be able to asynchronously invoke a member.
It will work in 2 ways:
-
Asynchronous invoke on a synchronous member
Condition: Member invoke return value is not an instance of Task
Result: This will wrap the synchronous invoke into an asynchronous one
-
Asynchronous invoke on an asynchronous member
Condition: Member invoke return value is an instance of Task
Result: The returned instance of Task is asynchronously awaited
Synchronous invoke will remain unchanged.
A new asynchronous invoke method overload (
InvokeAsync) should be added inObjectInvokerand all implementations ofIObjectMember. As implied by its name, the goal is to be able to asynchronously invoke a member.It will work in 2 ways:
Asynchronous invoke on a synchronous member
Condition: Member invoke return value is not an instance of
TaskResult: This will wrap the synchronous invoke into an asynchronous one
Asynchronous invoke on an asynchronous member
Condition: Member invoke return value is an instance of
TaskResult: The returned instance of
Taskis asynchronously awaitedSynchronous invoke will remain unchanged.