HubRouteBuilder.MapHub 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
MapHub<THub>(PathString) |
將具有指定路徑的傳入要求對應至指定的型別 Hub 。 |
MapHub<THub>(PathString, Action<HttpConnectionDispatcherOptions>) |
將具有指定路徑的傳入要求對應至指定的型別 Hub 。 |
MapHub<THub>(PathString)
將具有指定路徑的傳入要求對應至指定的型別 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>)
將具有指定路徑的傳入要求對應至指定的型別 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>
用來設定發送器選項的回呼。