共用方式為


ConnectionsAppBuilderExtensions.UseConnections 方法

定義

警告

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

將 ASP.NET Core連接處理常式的支援新增至 IApplicationBuilder 要求執行管線。

此方法已淘汰,將會在未來的版本中移除。 建議的替代方法是在 Microsoft.AspNetCore.Builder.UseEndpoints (...) 內使用 MapConnectionHandler 或 MapConnectionHandler TConnectionHandler <> 。

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

參數

configure
Action<ConnectionsRouteBuilder>

用來設定連線路由的回呼。

傳回

用於鏈結的相同 IApplicationBuilder 執行個體。

屬性

適用於