RoutingBuilderExtensions.UseRouter 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
UseRouter(IApplicationBuilder, IRouter) |
使用 RouterMiddleware 指定的 ,將中介軟體加入至指定的 IRouterIApplicationBuilder 。 |
UseRouter(IApplicationBuilder, Action<IRouteBuilder>) |
使用 RouterMiddleware 從設定的 建置 ,將中介軟體加入至指定的 IApplicationBuilderIRouter 。 IRouteBuilder |
UseRouter(IApplicationBuilder, IRouter)
使用 RouterMiddleware 指定的 ,將中介軟體加入至指定的 IRouterIApplicationBuilder 。
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
參數
- builder
- IApplicationBuilder
IApplicationBuilder要加入中介軟體的 。
傳回
完成作業之後,這個執行個體的參考。
適用於
UseRouter(IApplicationBuilder, Action<IRouteBuilder>)
使用 RouterMiddleware 從設定的 建置 ,將中介軟體加入至指定的 IApplicationBuilderIRouter 。 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
參數
- builder
- IApplicationBuilder
IApplicationBuilder要加入中介軟體的 。
- action
- Action<IRouteBuilder>
用於設定所提供 IRouteBuilder 的 Action<T>。
傳回
完成作業之後,這個執行個體的參考。