Share via


MaxLengthRouteConstraint Class

Definition

Constrains a route parameter to be a string with a maximum length.

public ref class MaxLengthRouteConstraint : Microsoft::AspNetCore::Routing::IRouteConstraint
public class MaxLengthRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint
public class MaxLengthRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.Matching.IParameterLiteralNodeMatchingPolicy
type MaxLengthRouteConstraint = class
    interface IRouteConstraint
type MaxLengthRouteConstraint = class
    interface IRouteConstraint
    interface IParameterPolicy
    interface IParameterLiteralNodeMatchingPolicy
type MaxLengthRouteConstraint = class
    interface IRouteConstraint
    interface IParameterPolicy
type MaxLengthRouteConstraint = class
    interface IParameterPolicy
    interface IRouteConstraint
Public Class MaxLengthRouteConstraint
Implements IRouteConstraint
Public Class MaxLengthRouteConstraint
Implements IParameterLiteralNodeMatchingPolicy, IRouteConstraint
Inheritance
MaxLengthRouteConstraint
Implements

Constructors

Name Description
MaxLengthRouteConstraint(Int32)

Initializes a new instance of the MaxLengthRouteConstraint class.

Properties

Name Description
MaxLength

Gets the maximum length allowed for the route parameter.

Methods

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

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

Explicit Interface Implementations

Name Description
IParameterLiteralNodeMatchingPolicy.MatchesLiteral(String, String)

Applies to