OptionalRouteConstraint Class
Constrains a route by an inner constraint that doesn't fail when an optional parameter is set to its default value.
Namespace: System.Web.Mvc.Routing.Constraints
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Inheritance Hierarchy
System.Object
System.Web.Mvc.Routing.Constraints.OptionalRouteConstraint
Syntax
public class OptionalRouteConstraint : IRouteConstraint
public ref class OptionalRouteConstraint : IRouteConstraint
type OptionalRouteConstraint =
class
interface IRouteConstraint
end
Public Class OptionalRouteConstraint
Implements IRouteConstraint
Constructors
Name | Description | |
---|---|---|
![]() |
OptionalRouteConstraint(IRouteConstraint) | Initializes a new instance of the OptionalRouteConstraint class. |
Properties
Name | Description | |
---|---|---|
![]() |
InnerConstraint | Gets the inner constraint to match if the parameter is not an optional parameter without a value. |
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