共用方式為


HubConnection.StreamAsyncCore<TResult> 方法

定義

使用指定的方法名稱、傳回型別和引數,在伺服器上叫用串流中樞方法。

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)

類型參數

TResult

串流伺服器方法的傳回型別。

參數

methodName
String

要叫用的伺服器方法名稱。

args
Object[]

用來叫用伺服器方法的引數。

cancellationToken
CancellationToken

用來監視是否有取消要求的語彙基元。 預設值是 None

傳回

IAsyncEnumerable<TResult>

IAsyncEnumerable<T> 表示資料流程。

適用於