RequiredRouteConstraint Class

Constraints a route parameter that must have a value.

Namespace
Microsoft.AspNetCore.Routing.Constraints
Assemblies
  • Microsoft.AspNetCore.Routing

Syntax

public class RequiredRouteConstraint : IRouteConstraint
class Microsoft.AspNetCore.Routing.Constraints.RequiredRouteConstraint

Methods

Match(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Routing.IRouter, System.String, Microsoft.AspNetCore.Routing.RouteValueDictionary, Microsoft.AspNetCore.Routing.RouteDirection)
Return type:System.Boolean
public bool Match(HttpContext httpContext, IRouter route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection)