Пример #1
0
        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));
        }
Пример #2
0
        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));
        }