/// <summary> /// Process a url through the route table to find what content address it would request content from /// </summary> /// <param name="url">The url</param> /// <returns>The address from which content would be requested if that url was in a request to the site</returns> public static Address GetAddressByUrl(string url) { RouteData urlRd = RouteX.GetRouteDataByUrl(url); if (urlRd.Routers[0] is DataRoute && urlRd.Routers[1] is DataFetchingRouter) { Type routeType = urlRd.Routers[1].GetType().GetGenericArguments()[0]; return(new Address(routeType, urlRd)); } return(null); }
/// <summary> /// Process a url through the route table to find what content address it would request content from /// </summary> /// <param name="url">The url</param> /// <returns>The address from which content would be requested if that url was in a request to the site</returns> public static Address GetAddressByUrl(string url) { RouteData urlRd = RouteX.GetRouteDataByUrl(url); if (urlRd.Route is IDataRoute) { Type routeType = urlRd.Route.GetType().GetGenericArguments()[0]; return(new Address(routeType, urlRd)); } return(null); }