Share via


HubConnectionExtensions.InvokeCoreAsync Method

Definition

Overloads

InvokeCoreAsync(HubConnection, String, Object[], CancellationToken)

Invokes a hub method on the server using the specified method name and arguments.

InvokeCoreAsync<TResult>(HubConnection, String, Object[], CancellationToken)

Invokes a hub method on the server using the specified method name and arguments.

InvokeCoreAsync(HubConnection, String, Object[], CancellationToken)

Source:
HubConnectionExtensions.InvokeAsync.cs
Source:
HubConnectionExtensions.InvokeAsync.cs
Source:
HubConnectionExtensions.InvokeAsync.cs
Source:
HubConnectionExtensions.InvokeAsync.cs
Source:
HubConnectionExtensions.InvokeAsync.cs
Source:
HubConnectionExtensions.InvokeAsync.cs
Source:
HubConnectionExtensions.InvokeAsync.cs
Source:
HubConnectionExtensions.InvokeAsync.cs
Source:
HubConnectionExtensions.InvokeAsync.cs

Invokes a hub method on the server using the specified method name and arguments.

public static System.Threading.Tasks.Task InvokeCoreAsync (this Microsoft.AspNetCore.SignalR.Client.HubConnection hubConnection, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task InvokeCoreAsync (this Microsoft.AspNetCore.SignalR.Client.HubConnection hubConnection, string methodName, object?[] args, System.Threading.CancellationToken cancellationToken = default);
static member InvokeCoreAsync : Microsoft.AspNetCore.SignalR.Client.HubConnection * string * obj[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function InvokeCoreAsync (hubConnection As HubConnection, methodName As String, args As Object(), Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

hubConnection
HubConnection

The hub connection.

methodName
String

The name of the server method to invoke.

args
Object[]

The arguments used to invoke the server method.

cancellationToken
CancellationToken

The token to monitor for cancellation requests. The default value is None.

Returns

A Task that represents the asynchronous invoke.

Applies to

InvokeCoreAsync<TResult>(HubConnection, String, Object[], CancellationToken)

Source:
HubConnectionExtensions.cs
Source:
HubConnectionExtensions.cs
Source:
HubConnectionExtensions.cs
Source:
HubConnectionExtensions.cs
Source:
HubConnectionExtensions.cs
Source:
HubConnectionExtensions.cs
Source:
HubConnectionExtensions.cs
Source:
HubConnectionExtensions.cs
Source:
HubConnectionExtensions.cs

Invokes a hub method on the server using the specified method name and arguments.

public static System.Threading.Tasks.Task<TResult> InvokeCoreAsync<TResult> (this Microsoft.AspNetCore.SignalR.Client.HubConnection hubConnection, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<TResult> InvokeCoreAsync<TResult> (this Microsoft.AspNetCore.SignalR.Client.HubConnection hubConnection, string methodName, object?[] args, System.Threading.CancellationToken cancellationToken = default);
static member InvokeCoreAsync : Microsoft.AspNetCore.SignalR.Client.HubConnection * string * obj[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Result>
<Extension()>
Public Function InvokeCoreAsync(Of TResult) (hubConnection As HubConnection, methodName As String, args As Object(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of TResult)

Type Parameters

TResult

The return type of the server method.

Parameters

hubConnection
HubConnection

The hub connection.

methodName
String

The name of the server method to invoke.

args
Object[]

The arguments used to invoke the server method.

cancellationToken
CancellationToken

The token to monitor for cancellation requests. The default value is None.

Returns

Task<TResult>

A Task<TResult> that represents the asynchronous invoke. The Result property returns a TResult for the hub method return value.

Applies to