Share via


RequiredRouteConstraint Class

Definition

Constraints a route parameter that must have a value.

public ref class RequiredRouteConstraint : Microsoft::AspNetCore::Routing::IRouteConstraint
public class RequiredRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint
type RequiredRouteConstraint = class
    interface IRouteConstraint
type RequiredRouteConstraint = class
    interface IRouteConstraint
    interface IParameterPolicy
type RequiredRouteConstraint = class
    interface IParameterPolicy
    interface IRouteConstraint
Public Class RequiredRouteConstraint
Implements IRouteConstraint
Inheritance
RequiredRouteConstraint
Implements

Remarks

This constraint is primarily used to enforce that a non-parameter value is present during URL generation.

Constructors

RequiredRouteConstraint()

Methods

Match(HttpContext, IRouter, String, RouteValueDictionary, RouteDirection)

Determines whether the URL parameter contains a valid value for this constraint.

Applies to