MethodDispatcherBase.DispatchAsync(Object, Int32, Object, CancellationToken) Method

Definition

This method is used to dispatch request to the specified methodId of the interface implemented by the remoted object.

public abstract System.Threading.Tasks.Task<object> DispatchAsync (object objectImplementation, int methodId, object requestBody, System.Threading.CancellationToken cancellationToken);
abstract member DispatchAsync : obj * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
Public MustOverride Function DispatchAsync (objectImplementation As Object, methodId As Integer, requestBody As Object, cancellationToken As CancellationToken) As Task(Of Object)

Parameters

objectImplementation
System.Object

The object impplemented the remoted interface.

methodId
System.Int32

Id of the method to which to dispatch the request to.

requestBody
System.Object

The body of the request object that needs to be dispatched to the object.

cancellationToken
System.Threading.CancellationToken

The cancellation token that will be signaled if this operation is cancelled.

Returns

System.Threading.Tasks.Task<System.Object>

A task that represents the outstanding asynchronous call to the implementation object. The return value of the task contains the returned value from the invoked method.

Applies to