public static ContentFolder.RouteFolder Route(string routePath) { string routeName = Path.GetFileName(routePath); string contentFolder = Path.GetFullPath(Path.Combine(routePath, "..\\..")); current = Content(contentFolder); return(current.Route(routeName)); }
public static ContentFolder.RouteFolder RouteFromActivity(string activityPath) { string traversal = "..\\.."; if (Path.GetFileName(Path.GetDirectoryName(activityPath)).Equals(OR, StringComparison.OrdinalIgnoreCase)) { traversal = "..\\..\\.."; } string routePath = Path.GetFullPath(Path.Combine(activityPath, traversal)); string routeName = Path.GetFileName(routePath); string contentFolder = Path.GetFullPath(Path.Combine(routePath, "..\\..")); current = Content(contentFolder); return(current.Route(routeName)); }