Megosztás a következőn keresztül:


ISingleClientProxy.InvokeCoreAsync<T> Method

Definition

Invokes a method on the connection represented by the ISingleClientProxy instance and waits for a result.

public System.Threading.Tasks.Task<T> InvokeCoreAsync<T> (string method, object?[] args, System.Threading.CancellationToken cancellationToken);
abstract member InvokeCoreAsync : string * obj[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
Public Function InvokeCoreAsync(Of T) (method As String, args As Object(), cancellationToken As CancellationToken) As Task(Of T)

Type Parameters

T

Parameters

method
String

Name of the method to invoke.

args
Object[]

A collection of arguments to pass to the client.

cancellationToken
CancellationToken

The token to monitor for cancellation requests. It is recommended to set a max wait for expecting a result.

Returns

Task<T>

A Task that represents the asynchronous invoke and wait for a client result.

Applies to