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 实例。

适用于