Dela via


Route Class

Definition

Represents an instance of a route.

public ref class Route : Microsoft::AspNetCore::Routing::RouteBase
public class Route : Microsoft.AspNetCore.Routing.RouteBase
type Route = class
    inherit RouteBase
Public Class Route
Inherits RouteBase
Inheritance

Constructors

Route(IRouter, String, IInlineConstraintResolver)

Constructs a new Route instance.

Route(IRouter, String, RouteValueDictionary, IDictionary<String,Object>, RouteValueDictionary, IInlineConstraintResolver)

Constructs a new Route instance.

Route(IRouter, String, String, RouteValueDictionary, IDictionary<String,Object>, RouteValueDictionary, IInlineConstraintResolver)

Constructs a new Route instance.

Properties

ConstraintResolver

Gets the resolver used for resolving inline constraints.

(Inherited from RouteBase)
Constraints

Gets the set of constraints associated with each route.

(Inherited from RouteBase)
DataTokens

Gets the data tokens associated with the route.

(Inherited from RouteBase)
Defaults

Gets the default values for each route parameter.

(Inherited from RouteBase)
Name

The name of the router. Can be null.

(Inherited from RouteBase)
ParsedTemplate

Gets the RouteTemplate associated with the route.

(Inherited from RouteBase)
RouteTemplate

Gets a string representation of the route template.

Methods

GetVirtualPath(VirtualPathContext)

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

(Inherited from RouteBase)
OnRouteMatched(RouteContext)

Executes asynchronously whenever routing occurs.

OnVirtualPathGenerated(VirtualPathContext)

Executes whenever a virtual path is derived from a context.

RouteAsync(RouteContext)

Asynchronously routes based on the current context.

(Inherited from RouteBase)
ToString() (Inherited from RouteBase)

Applies to