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);
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
 /// <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));
 }