HubRouteBuilder.MapHub 方法

定义

重载

MapHub<THub>(PathString)

将具有指定路径的传入请求映射到指定 Hub 类型。

MapHub<THub>(PathString, Action<HttpConnectionDispatcherOptions>)

将具有指定路径的传入请求映射到指定 Hub 类型。

MapHub<THub>(PathString)

Source:
HubRouteBuilder.cs
Source:
HubRouteBuilder.cs

将具有指定路径的传入请求映射到指定 Hub 类型。

public:
generic <typename THub>
 where THub : Microsoft::AspNetCore::SignalR::Hub void MapHub(Microsoft::AspNetCore::Http::PathString path);
public void MapHub<THub> (Microsoft.AspNetCore.Http.PathString path) where THub : Microsoft.AspNetCore.SignalR.Hub;
member this.MapHub : Microsoft.AspNetCore.Http.PathString -> unit (requires 'Hub :> Microsoft.AspNetCore.SignalR.Hub)
Public Sub MapHub(Of THub As Hub) (path As PathString)

类型参数

THub

Hub 将请求映射到的类型。

参数

path
PathString

请求路径。

适用于

MapHub<THub>(PathString, Action<HttpConnectionDispatcherOptions>)

Source:
HubRouteBuilder.cs
Source:
HubRouteBuilder.cs

将具有指定路径的传入请求映射到指定 Hub 类型。

public:
generic <typename THub>
 where THub : Microsoft::AspNetCore::SignalR::Hub void MapHub(Microsoft::AspNetCore::Http::PathString path, Action<Microsoft::AspNetCore::Http::Connections::HttpConnectionDispatcherOptions ^> ^ configureOptions);
public void MapHub<THub> (Microsoft.AspNetCore.Http.PathString path, Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> configureOptions) where THub : Microsoft.AspNetCore.SignalR.Hub;
member this.MapHub : Microsoft.AspNetCore.Http.PathString * Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> -> unit (requires 'Hub :> Microsoft.AspNetCore.SignalR.Hub)
Public Sub MapHub(Of THub As Hub) (path As PathString, configureOptions As Action(Of HttpConnectionDispatcherOptions))

类型参数

THub

Hub 将请求映射到的类型。

参数

path
PathString

请求路径。

configureOptions
Action<HttpConnectionDispatcherOptions>

用于配置调度程序选项的回调。

适用于