Share via


HubConnection.StreamAsyncCore<TResult> Method

Definition

Invokes a streaming hub method on the server using the specified method name, return type and arguments.

public System.Collections.Generic.IAsyncEnumerable<TResult> StreamAsyncCore<TResult> (string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Collections.Generic.IAsyncEnumerable<TResult> StreamAsyncCore<TResult> (string methodName, object?[] args, System.Threading.CancellationToken cancellationToken = default);
member this.StreamAsyncCore : string * obj[] * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Result>
abstract member StreamAsyncCore : string * obj[] * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Result>
override this.StreamAsyncCore : string * obj[] * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Result>
Public Function StreamAsyncCore(Of TResult) (methodName As String, args As Object(), Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TResult)
Public Overridable Function StreamAsyncCore(Of TResult) (methodName As String, args As Object(), Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TResult)

Type Parameters

TResult

The return type of the streaming server method.

Parameters

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

IAsyncEnumerable<TResult>

A IAsyncEnumerable<T> that represents the stream.

Applies to