Condividi tramite


MethodDispatcherBase.DispatchAsync 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
Object

The object impplemented the remoted interface.

methodId
Int32

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

requestBody
Object

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

cancellationToken
CancellationToken

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

Returns

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