LengthRouteConstraint Class
Constrains a route parameter to be a string of a given length or within a given range of lengths.
Namespace: System.Web.Mvc.Routing.Constraints
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Inheritance Hierarchy
System.Object
System.Web.Mvc.Routing.Constraints.LengthRouteConstraint
Syntax
public class LengthRouteConstraint : IRouteConstraint
public ref class LengthRouteConstraint : IRouteConstraint
type LengthRouteConstraint =
class
interface IRouteConstraint
end
Public Class LengthRouteConstraint
Implements IRouteConstraint
Constructors
Name | Description | |
---|---|---|
![]() |
LengthRouteConstraint(Int32) | |
![]() |
LengthRouteConstraint(Int32, Int32) | Initializes a new instance of the LengthRouteConstraint class that constrains a route parameter to be a string of a given length. |
Properties
Name | Description | |
---|---|---|
![]() |
Length | Gets the length of the route parameter, if one is set. |
![]() |
MaxLength | Gets the maximum length of the route parameter, if one is set. |
![]() |
MinLength | Gets the minimum length of the route parameter, if one is set. |
Methods
Name | Description | |
---|---|---|
![]() |
Equals(Object) | (Inherited from Object.) |
![]() |
Finalize() | (Inherited from Object.) |
![]() |
GetHashCode() | (Inherited from Object.) |
![]() |
GetType() | (Inherited from Object.) |
![]() |
Match(HttpContextBase, Route, String, RouteValueDictionary, RouteDirection) | |
![]() |
MemberwiseClone() | (Inherited from Object.) |
![]() |
ToString() | (Inherited from Object.) |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
System.Web.Mvc.Routing.Constraints Namespace
Return to top