public RoutingConventions() { Settings = new RoutingConventionsSettings(); #if WEBAPI Constraints = new Dictionary <Type, Func <IHttpRouteConstraint> >(); #else Constraints = new Dictionary <Type, Func <IRouteConstraint> >(); #endif AddDefaultConstraints(); }
/// <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)); }