November Happy Hour will be moved to Thursday December 5th.

Class RequiredDefaultsConstraint

A constraint used to determine if the supplied route values does not differ from the default route values.

Inheritance
System.Object
RequiredDefaultsConstraint
Implements
System.Web.Routing.IRouteConstraint
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.Routing
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public class RequiredDefaultsConstraint : IRouteConstraint

Constructors

RequiredDefaultsConstraint()

Declaration
public RequiredDefaultsConstraint()

Methods

Match(HttpContextBase, Route, String, RouteValueDictionary, RouteDirection)

Tries to match the values with the route default values.

Declaration
public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext

Not used in this constraint.

System.Web.Routing.Route route

The route whose defaults is used to determine a match.

System.String parameterName

Not used in this constraint.

System.Web.Routing.RouteValueDictionary values

The values to match against the route default values.

System.Web.Routing.RouteDirection routeDirection

Not used in this constraint.

Returns
Type Description
System.Boolean

True if values contains a controller value or if it matches route default values with the same key. Otherwise false.

Remarks

First checks if values contains a controller value. If a controller value is found it will not match against route default values.

Implements

System.Web.Routing.IRouteConstraint

Extension Methods