public void Remove(RouteConfigElement url) { if (BaseIndexOf(url) >= 0) { BaseRemove(url.Name); } }
/// <summary> /// Gets the instance of route handler. /// </summary> /// <param name="route">The route.</param> /// <returns>IRouteHandler</returns> private static IRouteHandler GetInstanceOfRouteHandler(RouteConfigElement route) { IRouteHandler routeHandler; if (IsDebugEnabled) { log.Debug("route={0}", route); } if (route.RouteHandlerType.IsWhiteSpace()) { routeHandler = new RouteHandler <Page>(route.VirtualPath, true); } else { try { Type routeHandlerType = Type.GetType(route.RouteHandlerType); if (IsDebugEnabled) { log.Debug("route={0}, routeHandlerType={1}", route, routeHandlerType); } routeHandler = Activator.CreateInstance(routeHandlerType) as IRouteHandler; } catch (Exception e) { throw new ApplicationException(string.Format("Can't create an instance of IRouteHandler {0}", route.RouteHandlerType), e); } } if (IsDebugEnabled) { log.Debug("route={0}, routeHandler={1}", route, routeHandler); } return(routeHandler); }
public void Add(RouteConfigElement url) { BaseAdd(url); }
public int IndexOf(RouteConfigElement url) { return BaseIndexOf(url); }
public void Remove(RouteConfigElement url) { if(BaseIndexOf(url) >= 0) BaseRemove(url.Name); }
/// <summary> /// Gets the data tokens. /// </summary> /// <param name="route">The route.</param> /// <returns>RouteValueDictionary</returns> private static RouteValueDictionary GetDataTokens(RouteConfigElement route) { return GetRouteValueDictionary(route.DataTokens.Attributes); }
/// <summary> /// Gets the defaults. /// </summary> /// <param name="route">The route.</param> /// <returns>RouteValueDictionary</returns> private static RouteValueDictionary GetDefaults(RouteConfigElement route) { return GetRouteValueDictionary(route.Defaults.Attributes); }
/// <summary> /// Gets the constraints. /// </summary> /// <param name="route">The route.</param> /// <returns>RouteValueDictionary</returns> private static RouteValueDictionary GetConstraints(RouteConfigElement route) { return GetRouteValueDictionary(route.Constraints.Attributes); }
/// <summary> /// Gets the instance of route handler. /// </summary> /// <param name="route">The route.</param> /// <returns>IRouteHandler</returns> private static IRouteHandler GetInstanceOfRouteHandler(RouteConfigElement route) { IRouteHandler routeHandler; if(IsDebugEnabled) log.Debug("route={0}", route); if(route.RouteHandlerType.IsWhiteSpace()) routeHandler = new RouteHandler<Page>(route.VirtualPath, true); else { try { Type routeHandlerType = Type.GetType(route.RouteHandlerType); if(IsDebugEnabled) log.Debug("route={0}, routeHandlerType={1}", route, routeHandlerType); routeHandler = Activator.CreateInstance(routeHandlerType) as IRouteHandler; } catch(Exception e) { throw new ApplicationException(string.Format("Can't create an instance of IRouteHandler {0}", route.RouteHandlerType), e); } } if(IsDebugEnabled) log.Debug("route={0}, routeHandler={1}", route, routeHandler); return routeHandler; }
public int IndexOf(RouteConfigElement url) { return(BaseIndexOf(url)); }
/// <summary> /// Gets the data tokens. /// </summary> /// <param name="route">The route.</param> /// <returns>RouteValueDictionary</returns> private static RouteValueDictionary GetDataTokens(RouteConfigElement route) { return(GetRouteValueDictionary(route.DataTokens.Attributes)); }
/// <summary> /// Gets the defaults. /// </summary> /// <param name="route">The route.</param> /// <returns>RouteValueDictionary</returns> private static RouteValueDictionary GetDefaults(RouteConfigElement route) { return(GetRouteValueDictionary(route.Defaults.Attributes)); }
/// <summary> /// Gets the constraints. /// </summary> /// <param name="route">The route.</param> /// <returns>RouteValueDictionary</returns> private static RouteValueDictionary GetConstraints(RouteConfigElement route) { return(GetRouteValueDictionary(route.Constraints.Attributes)); }