RoutingBuilderExtensions Class¶
Extension methods for adding the Microsoft.AspNetCore.Builder.RouterMiddleware
middleware to an Microsoft.AspNetCore.Builder.IApplicationBuilder
.
- Namespace
Microsoft.AspNetCore.Builder
- Assemblies
- Microsoft.AspNetCore.Routing
Syntax¶
public class RoutingBuilderExtensions
-
class
Microsoft.AspNetCore.Builder.
RoutingBuilderExtensions
Methods¶
-
UseRouter
(Microsoft.AspNetCore.Builder.IApplicationBuilder, Microsoft.AspNetCore.Routing.IRouter)¶ Adds a
Microsoft.AspNetCore.Builder.RouterMiddleware
middleware to the specifiedMicrosoft.AspNetCore.Builder.IApplicationBuilder
with the specifiedMicrosoft.AspNetCore.Routing.IRouter
.Arguments: - builder (Microsoft.AspNetCore.Builder.IApplicationBuilder) – The
Microsoft.AspNetCore.Builder.IApplicationBuilder
to add the middleware to. - router (Microsoft.AspNetCore.Routing.IRouter) – The
Microsoft.AspNetCore.Routing.IRouter
to use for routing requests.
Return type: Returns: A reference to this instance after the operation has completed.
public static IApplicationBuilder UseRouter(this IApplicationBuilder builder, IRouter router)
- builder (Microsoft.AspNetCore.Builder.IApplicationBuilder) – The
-