SignalRConnectionBuilderExtensions.UseHub<THub> 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
配置连接以托管指定 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 实例。