RouteCollection Class

Definition

Supports managing a collection for multiple routes.

C#
public class RouteCollection : Microsoft.AspNetCore.Routing.IRouteCollection, Microsoft.AspNetCore.Routing.IRouter
Inheritance
RouteCollection
Implements

Constructors

Properties

Count

Gets the total number of routes registered in the collection.

Item[Int32]

Gets the route at a given index.

Methods

Add(IRouter)

Appends the collection of routes defined in router.

GetVirtualPath(VirtualPathContext)

Returns the URL that is associated with the route details provided in context

RouteAsync(RouteContext)

Asynchronously routes based on the current context.

Applies to

Produk Versi
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0