protected virtual bool ProcessConstraint (HttpContextBase httpContext, object constraint, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
{
if (parameterName == null)
throw new ArgumentNullException ("parameterName");
// .NET "compatibility"
if (values == null)
throw new NullReferenceException ();
bool invalidConstraint;
bool ret = ProcessConstraintInternal (httpContext, this, constraint, parameterName, values, routeDirection, out invalidConstraint);
if (invalidConstraint)
throw new InvalidOperationException (
String.Format (
"Constraint parameter '{0}' on the route with URL '{1}' must have a string value type or be a type which implements IRouteConstraint",
parameterName, Url
)
);
return ret;
}
}