HubConnectionExtensions.StreamAsChannelCoreAsync<TResult> Metoda

Definicja

Wywołuje metodę centrum przesyłania strumieniowego na serwerze przy użyciu określonej nazwy metody, zwracanego typu i argumentów.

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

Parametry typu

TResult

Zwracany typ metody serwera przesyłania strumieniowego.

Parametry

hubConnection
HubConnection

Połączenie koncentratora.

methodName
String

Nazwa metody serwera do wywołania.

args
Object[]

Argumenty używane do wywoływania metody serwera.

cancellationToken
CancellationToken

Token do monitorowania żądań anulowania. Wartość domyślna to None.

Zwraca

Task<ChannelReader<TResult>>

Element Task<TResult> reprezentujący wywołanie asynchroniczne. Właściwość Result zwraca ChannelReader<T> wartość dla wartości metody centrum przesyłanego strumieniowo.

Dotyczy