Example #1
0
        public IContent RouteContent(IEnumerable <string> segments, string language)
        {
            foreach (var root in RoutableRootContentProvider.GetAll())
            {
                var result = RootContentRouter.Route(root, segments, language);

                if (result != null)
                {
                    return(result);
                }
            }

            return(null);
        }
Example #2
0
        public object RouteContent(IEnumerable <string> segments, IEnumerable <ContentTypeDescriptor> types)
        {
            foreach (var root in RoutableRootContentProvider.GetAll())
            {
                if (types.Any() && !types.Any(t => t.Type == root.GetType()))
                {
                    continue;
                }

                var result = RootContentRouter.Route(root, segments, types);

                if (result == null)
                {
                    continue;
                }

                return(result);
            }

            return(null);
        }