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.RouterMiddlewaremiddleware to the specifiedMicrosoft.AspNetCore.Builder.IApplicationBuilderwith the specifiedMicrosoft.AspNetCore.Routing.IRouter.Arguments: - builder (Microsoft.AspNetCore.Builder.IApplicationBuilder) – The
Microsoft.AspNetCore.Builder.IApplicationBuilderto add the middleware to. - router (Microsoft.AspNetCore.Routing.IRouter) – The
Microsoft.AspNetCore.Routing.IRouterto 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
-