Share via


MethodDispatcherBase.OnDispatchAsync Method

Definition

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

protected abstract System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingResponseMessageBody> OnDispatchAsync (int methodId, object remotedObject, Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingRequestMessageBody requestBody, Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingMessageBodyFactory remotingMessageBodyFactory, System.Threading.CancellationToken cancellationToken);
abstract member OnDispatchAsync : int * obj * Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingRequestMessageBody * Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingMessageBodyFactory * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingResponseMessageBody>
Protected MustOverride Function OnDispatchAsync (methodId As Integer, remotedObject As Object, requestBody As IServiceRemotingRequestMessageBody, remotingMessageBodyFactory As IServiceRemotingMessageBodyFactory, cancellationToken As CancellationToken) As Task(Of IServiceRemotingResponseMessageBody)

Parameters

methodId
Int32

Id of the method.

remotedObject
Object

The remoted object instance.

requestBody
IServiceRemotingRequestMessageBody

Request body

remotingMessageBodyFactory
IServiceRemotingMessageBodyFactory

Remoting Message Body Factory implementation needed for creating response object.

cancellationToken
CancellationToken

Cancellation token

Returns

A Task that represents outstanding operation. The result of the task is the return value from the method.

Applies to