Esempio n. 1
0
        public RoutingConventions()
        {
            Settings = new RoutingConventionsSettings();
#if WEBAPI
            Constraints = new Dictionary <Type, Func <IHttpRouteConstraint> >();
#else
            Constraints = new Dictionary <Type, Func <IRouteConstraint> >();
#endif
            AddDefaultConstraints();
        }
Esempio n. 2
0
 /// <summary>
 /// Removes the namespace root from the provided string
 /// </summary>
 /// <param name="settings"></param>
 /// <param name="namespace">Usually the namespace of the controller</param>
 /// <returns></returns>
 public static string StripNamespaceRoot(this RoutingConventionsSettings settings, string @namespace)
 {
     return(@namespace.Remove(0, settings.NamespaceRoot.Length));
 }