共用方式為


SignalRConnectionBuilderExtensions.UseHub<THub> 方法

定義

設定連接以裝載指定的型別 Hub

public:
generic <typename THub>
 where THub : Microsoft::AspNetCore::SignalR::Hub[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Connections::IConnectionBuilder ^ UseHub(Microsoft::AspNetCore::Connections::IConnectionBuilder ^ connectionBuilder);
public static Microsoft.AspNetCore.Connections.IConnectionBuilder UseHub<THub> (this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder) where THub : Microsoft.AspNetCore.SignalR.Hub;
static member UseHub : Microsoft.AspNetCore.Connections.IConnectionBuilder -> Microsoft.AspNetCore.Connections.IConnectionBuilder (requires 'Hub :> Microsoft.AspNetCore.SignalR.Hub)
<Extension()>
Public Function UseHub(Of THub As Hub) (connectionBuilder As IConnectionBuilder) As IConnectionBuilder

類型參數

THub

Hub 裝載于連線上的型別。

參數

connectionBuilder
IConnectionBuilder

要設定的連線。

傳回

用於鏈結的相同 IConnectionBuilder 執行個體。

適用於