LengthRouteConstraint Class

 

Constrains a route parameter to be a string of a given length or within a given range of lengths.

Namespace:   System.Web.Http.Routing.Constraints
Assembly:  System.Web.Http (in System.Web.Http.dll)

Inheritance Hierarchy

System.Object
  System.Web.Http.Routing.Constraints.LengthRouteConstraint

Syntax

public class LengthRouteConstraint : IHttpRouteConstraint
public ref class LengthRouteConstraint : IHttpRouteConstraint
type LengthRouteConstraint = 
    class
        interface IHttpRouteConstraint
    end
Public Class LengthRouteConstraint
    Implements IHttpRouteConstraint

Constructors

Name Description
System_CAPS_pubmethod LengthRouteConstraint(Int32)

System_CAPS_pubmethod 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
System_CAPS_pubproperty Length

Gets the length of the route parameter, if one is set.

System_CAPS_pubproperty MaxLength

Gets the maximum length of the route parameter, if one is set.

System_CAPS_pubproperty MinLength

Gets the minimum length of the route parameter, if one is set.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod Match(HttpRequestMessage, IHttpRoute, String, IDictionary<String, Object>, HttpRouteDirection)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod 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.Http.Routing.Constraints Namespace

Return to top