共用方式為


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 執行個體。

屬性

適用於