ConnectionsAppBuilderExtensions.UseConnections Method

Definition

Caution

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

Adds support for ASP.NET Core Connection Handlers to the IApplicationBuilder request execution pipeline.

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

C#
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseConnections (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Action<Microsoft.AspNetCore.Http.Connections.ConnectionsRouteBuilder> configure);
C#
[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);

Parameters

configure
Action<ConnectionsRouteBuilder>

A callback to configure connection routes.

Returns

The same instance of the IApplicationBuilder for chaining.

Attributes

Applies to

Product Versions (Obsolete)
ASP.NET Core 2.1, 2.2 (3.0, 3.1)