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 (...) 中使用 MapConnections 或 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 实例。

属性

适用于