Bagikan melalui


RoutingBuilderExtensions.UseRouter Metode

Definisi

Overload

UseRouter(IApplicationBuilder, IRouter)

RouterMiddleware Menambahkan middleware ke yang ditentukan IApplicationBuilder dengan yang ditentukanIRouter.

UseRouter(IApplicationBuilder, Action<IRouteBuilder>)

RouterMiddleware Menambahkan middleware ke yang ditentukan IApplicationBuilder dengan yang dibuat dari yang dikonfigurasi IRouterIRouteBuilder.

UseRouter(IApplicationBuilder, IRouter)

Sumber:
RoutingBuilderExtensions.cs
Sumber:
RoutingBuilderExtensions.cs
Sumber:
RoutingBuilderExtensions.cs

RouterMiddleware Menambahkan middleware ke yang ditentukan IApplicationBuilder dengan yang ditentukanIRouter.

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

Parameter

builder
IApplicationBuilder

untuk IApplicationBuilder menambahkan middleware.

router
IRouter

yang IRouter digunakan untuk permintaan perutean.

Mengembalikan

Referensi ke instans ini setelah operasi selesai.

Berlaku untuk

UseRouter(IApplicationBuilder, Action<IRouteBuilder>)

Sumber:
RoutingBuilderExtensions.cs
Sumber:
RoutingBuilderExtensions.cs
Sumber:
RoutingBuilderExtensions.cs

RouterMiddleware Menambahkan middleware ke yang ditentukan IApplicationBuilder dengan yang dibuat dari yang dikonfigurasi IRouterIRouteBuilder.

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

Parameter

builder
IApplicationBuilder

untuk IApplicationBuilder menambahkan middleware.

action
Action<IRouteBuilder>

Action<T> untuk mengonfigurasi yang disediakan IRouteBuilder.

Mengembalikan

Referensi ke instans ini setelah operasi selesai.

Berlaku untuk