Udostępnij za pośrednictwem


ConnectionsAppBuilderExtensions.UseConnections Metoda

Definicja

Przestroga

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

Dodaje obsługę programów obsługi połączeń ASP.NET Core do potoku IApplicationBuilder wykonywania żądań.

Ta metoda jest przestarzała i zostanie usunięta w przyszłej wersji. Zalecaną alternatywą jest użycie funkcji MapConnections lub MapConnectionHandler TConnectionHandler<> wewnątrz elementu Microsoft.AspNetCore.Builder.UseEndpoints(...).

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

Parametry

configure
Action<ConnectionsRouteBuilder>

Wywołanie zwrotne do konfigurowania tras połączenia.

Zwraca

To samo wystąpienie elementu IApplicationBuilder do tworzenia łańcucha.

Atrybuty

Dotyczy