SignalRAppBuilderExtensions.UseSignalR 方法

定义

注意

This method is obsolete and will be removed in a future version. The recommended alternative is to use MapHub<THub> inside Microsoft.AspNetCore.Builder.UseEndpoints(...).

将 SignalR 添加到 IApplicationBuilder 请求执行管道。

此方法已过时,并将从未来版本中删除。 建议的替代方法是在 Microsoft.AspNetCore.Builder.UseEndpoints (...) 中使用 MapHub<THub> 。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseSignalR(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Action<Microsoft::AspNetCore::SignalR::HubRouteBuilder ^> ^ configure);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseSignalR (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Action<Microsoft.AspNetCore.SignalR.HubRouteBuilder> configure);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is to use MapHub<THub> inside Microsoft.AspNetCore.Builder.UseEndpoints(...).")]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseSignalR (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Action<Microsoft.AspNetCore.SignalR.HubRouteBuilder> configure);
static member UseSignalR : Microsoft.AspNetCore.Builder.IApplicationBuilder * Action<Microsoft.AspNetCore.SignalR.HubRouteBuilder> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is to use MapHub<THub> inside Microsoft.AspNetCore.Builder.UseEndpoints(...).")>]
static member UseSignalR : Microsoft.AspNetCore.Builder.IApplicationBuilder * Action<Microsoft.AspNetCore.SignalR.HubRouteBuilder> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseSignalR (app As IApplicationBuilder, configure As Action(Of HubRouteBuilder)) As IApplicationBuilder

参数

configure
Action<HubRouteBuilder>

用于配置中心路由的回调。

返回

用于链接的相同 IApplicationBuilder 实例。

属性

适用于