Пример #1
0
        public IEnumerable<string> Articles()
        {
            var articleEvaluators = new List<IRouteEvaluator>
            {
                new EnsureThatRouteContainMarkupDocument()
            };

            var routeReader = new RouteReader(articleEvaluators);
            var routes = routeReader.Routes(_rootPath, transformToRoutes:false);

            return routes;
        }
        public IEnumerable<string> StaticRoutes()
        {
            if (_staticRoutes.Any()) return _staticRoutes;

            var staticEvaluators = new List<IRouteEvaluator>
            {
                new EnsureThatRouteIsNotBlackListed(_blackListedRoutes),
                new EnsureThatRouteDoesNotContainNumbers(),
                new EnsureThatRouteContainMarkupDocument(),
                new EnsureThatDocumentIsValidMarkdown()
            };

            var routeReader = new RouteReader(staticEvaluators);
            _staticRoutes = routeReader.Routes(_rootPath);

            return _staticRoutes;
        }
        public IEnumerable<string> DateRoutes()
        {
            if (_dateRoutes.Any()) return _dateRoutes;

            var dateEvaluators = new List<IRouteEvaluator>
            {
                new EnsureThatRouteIsNotBlackListed(_blackListedRoutes),
                new EnsureThatRouteContainDateParts(),
                new EnsureThatRouteContainMarkupDocument(),
                new EnsureThatDocumentIsValidMarkdown()
            };

            var routeReader = new RouteReader(dateEvaluators);
            _dateRoutes = routeReader.Routes(_rootPath);

            return _dateRoutes;
        }