RoutingBuilderExtensions.UseRouter 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
UseRouter(IApplicationBuilder, IRouter) |
使用 RouterMiddleware 指定的 IApplicationBuilder 将中间件添加到指定的 IRouter。 |
UseRouter(IApplicationBuilder, Action<IRouteBuilder>) |
RouterMiddleware使用从配置的 IRouteBuilder生成的 将中间件添加到指定的 IApplicationBuilderIRouter 。 |
UseRouter(IApplicationBuilder, IRouter)
- Source:
- RoutingBuilderExtensions.cs
- Source:
- RoutingBuilderExtensions.cs
- Source:
- RoutingBuilderExtensions.cs
使用 RouterMiddleware 指定的 IApplicationBuilder 将中间件添加到指定的 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
参数
- builder
- IApplicationBuilder
要 IApplicationBuilder 向其添加中间件的 。
返回
完成操作后对此实例的引用。
适用于
UseRouter(IApplicationBuilder, Action<IRouteBuilder>)
- Source:
- RoutingBuilderExtensions.cs
- Source:
- RoutingBuilderExtensions.cs
- Source:
- RoutingBuilderExtensions.cs
RouterMiddleware使用从配置的 IRouteBuilder生成的 将中间件添加到指定的 IApplicationBuilderIRouter 。
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>。
返回
完成操作后对此实例的引用。