RoutingBuilderExtensions.UseRouter Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
UseRouter(IApplicationBuilder, IRouter) |
Adds a RouterMiddleware middleware to the specified IApplicationBuilder with the specified IRouter. |
UseRouter(IApplicationBuilder, Action<IRouteBuilder>) |
Adds a RouterMiddleware middleware to the specified IApplicationBuilder with the IRouter built from configured IRouteBuilder. |
UseRouter(IApplicationBuilder, IRouter)
- Source:
- RoutingBuilderExtensions.cs
- Source:
- RoutingBuilderExtensions.cs
- Source:
- RoutingBuilderExtensions.cs
Adds a RouterMiddleware middleware to the specified IApplicationBuilder with the specified 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
Parameters
- builder
- IApplicationBuilder
The IApplicationBuilder to add the middleware to.
Returns
A reference to this instance after the operation has completed.
Applies to
UseRouter(IApplicationBuilder, Action<IRouteBuilder>)
- Source:
- RoutingBuilderExtensions.cs
- Source:
- RoutingBuilderExtensions.cs
- Source:
- RoutingBuilderExtensions.cs
Adds a RouterMiddleware middleware to the specified IApplicationBuilder with the IRouter built from configured 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
Parameters
- builder
- IApplicationBuilder
The IApplicationBuilder to add the middleware to.
- action
- Action<IRouteBuilder>
An Action<T> to configure the provided IRouteBuilder.
Returns
A reference to this instance after the operation has completed.