protected virtual bool Match(HttpContextBase context, Route route, ValueDictionary values, RouteDirection direction) { Precondition.Require(values, () => Error.ArgumentNull("values")); string value = values.GetValue<string>(_parameterName) ?? String.Empty; return _pattern.IsMatch(value); }
protected virtual bool Match(HttpContextBase context, Route route, ValueDictionary values, RouteDirection direction) { Precondition.Require(values, () => Error.ArgumentNull("values")); string value = values.GetValue <string>(_parameterName) ?? String.Empty; return(_pattern.IsMatch(value)); }
/// <summary> /// Gets the typed value of the route parameter /// with the specified name /// </summary> /// <typeparam name="TValue">The type of the /// parameter value</typeparam> /// <param name="key">The name of the /// parameter to find</param> public TValue GetValue <TValue>(string key) { return(_values.GetValue <TValue>(key)); }