Partager via


RoutingBuilderExtensions.UseRouter Méthode

Définition

Surcharges

UseRouter(IApplicationBuilder, IRouter)

Ajoute un RouterMiddleware intergiciel au spécifié IApplicationBuilder avec le spécifié IRouter.

UseRouter(IApplicationBuilder, Action<IRouteBuilder>)

Ajoute un RouterMiddleware intergiciel au spécifié IApplicationBuilder avec le IRouter généré à partir de configuré IRouteBuilder.

UseRouter(IApplicationBuilder, IRouter)

Source:
RoutingBuilderExtensions.cs
Source:
RoutingBuilderExtensions.cs
Source:
RoutingBuilderExtensions.cs

Ajoute un RouterMiddleware intergiciel au spécifié IApplicationBuilder avec le spécifié IRouter.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseRouter(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ builder, Microsoft::AspNetCore::Routing::IRouter ^ router);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRouter (this Microsoft.AspNetCore.Builder.IApplicationBuilder builder, Microsoft.AspNetCore.Routing.IRouter router);
static member UseRouter : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Routing.IRouter -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseRouter (builder As IApplicationBuilder, router As IRouter) As IApplicationBuilder

Paramètres

builder
IApplicationBuilder

IApplicationBuilder à laquelle ajouter le middleware.

router
IRouter

IRouter à utiliser pour le routage des demandes.

Retours

Référence à cette instance à la fin de l’opération.

S’applique à

UseRouter(IApplicationBuilder, Action<IRouteBuilder>)

Source:
RoutingBuilderExtensions.cs
Source:
RoutingBuilderExtensions.cs
Source:
RoutingBuilderExtensions.cs

Ajoute un RouterMiddleware intergiciel au spécifié IApplicationBuilder avec le IRouter généré à partir de configuré IRouteBuilder.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseRouter(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ builder, Action<Microsoft::AspNetCore::Routing::IRouteBuilder ^> ^ action);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRouter (this Microsoft.AspNetCore.Builder.IApplicationBuilder builder, Action<Microsoft.AspNetCore.Routing.IRouteBuilder> action);
static member UseRouter : Microsoft.AspNetCore.Builder.IApplicationBuilder * Action<Microsoft.AspNetCore.Routing.IRouteBuilder> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseRouter (builder As IApplicationBuilder, action As Action(Of IRouteBuilder)) As IApplicationBuilder

Paramètres

builder
IApplicationBuilder

IApplicationBuilder à laquelle ajouter le middleware.

action
Action<IRouteBuilder>

Action<T> pour configurer le IRouteBuilder fourni.

Retours

Référence à cette instance à la fin de l’opération.

S’applique à