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 specified Microsoft.AspNetCore.Builder.IApplicationBuilder with the specified Microsoft.AspNetCore.Routing.IRouter.

Arguments:
Return type:

Microsoft.AspNetCore.Builder.IApplicationBuilder

Returns:

A reference to this instance after the operation has completed.

public static IApplicationBuilder UseRouter(this IApplicationBuilder builder, IRouter router)