Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

HubRouteBuilder.MapHub Method

Definition

Namespace:
Microsoft.AspNetCore.SignalR
Assembly:
Microsoft.AspNetCore.SignalR.dll
Package:
Microsoft.AspNetCore.SignalR v1.0.0
Package:
Microsoft.AspNetCore.SignalR v1.1.0
Package:
Microsoft.AspNetCore.App.Ref v3.0.1
Package:
Microsoft.AspNetCore.App.Ref v3.1.10

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

Name Description
MapHub<THub>(PathString)

Maps incoming requests with the specified path to the specified Hub type.

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

Maps incoming requests with the specified path to the specified Hub type.

MapHub<THub>(PathString)

Source:
HubRouteBuilder.cs
Source:
HubRouteBuilder.cs

Maps incoming requests with the specified path to the specified Hub type.

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)

Type Parameters

THub

The Hub type to map requests to.

Parameters

path
PathString

The request path.

Applies to

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

Source:
HubRouteBuilder.cs
Source:
HubRouteBuilder.cs

Maps incoming requests with the specified path to the specified Hub type.

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))

Type Parameters

THub

The Hub type to map requests to.

Parameters

path
PathString

The request path.

configureOptions
Action<HttpConnectionDispatcherOptions>

A callback to configure dispatcher options.

Applies to


Feedback

Was this page helpful?