Compartir a través de


RoutingBuilderExtensions.UseRouter Método

Definición

Sobrecargas

UseRouter(IApplicationBuilder, IRouter)

Agrega un RouterMiddleware middleware al especificado IApplicationBuilder con el especificado IRouter.

UseRouter(IApplicationBuilder, Action<IRouteBuilder>)

Agrega un RouterMiddleware middleware al especificado IApplicationBuilder con el IRouter creado a partir de configurado IRouteBuilder.

UseRouter(IApplicationBuilder, IRouter)

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

Agrega un RouterMiddleware middleware al especificado IApplicationBuilder con el especificado 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

Parámetros

builder
IApplicationBuilder

al IApplicationBuilder que se va a agregar el middleware.

router
IRouter

que IRouter se va a usar para enrutar solicitudes.

Devoluciones

Una referencia a esta instancia después de que se haya completado la operación.

Se aplica a

UseRouter(IApplicationBuilder, Action<IRouteBuilder>)

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

Agrega un RouterMiddleware middleware al especificado IApplicationBuilder con el IRouter creado a partir de configurado 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

Parámetros

builder
IApplicationBuilder

al IApplicationBuilder que se va a agregar el middleware.

action
Action<IRouteBuilder>

Action<T> para configurar el objeto IRouteBuilder proporcionado.

Devoluciones

Una referencia a esta instancia después de que se haya completado la operación.

Se aplica a