MethodDispatcherBase.OnDispatchAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Azure SDK for .NET