예제 #1
0
        public IEnumerable <IBlogArticle> GetPageOfBlogArticles(int startIndex, int pageSize, Sorting.Interfaces.ISorter sorter)
        {
            var nodes = GetAllBlogArticles();

            var sortedNodes = sorter.Sort(nodes);

            return(nodes.Skip(startIndex).Take(pageSize));
        }
예제 #2
0
        public IEnumerable <IBlogArticle> GetPageOfBlogArticlesWithTag(string tag, int parentNodeId, int startIndex, int pageSize, Sorting.Interfaces.ISorter sorter)
        {
            var nodes = GetAllBlogArticles(parentNodeId);

            var sortedNodes = sorter.Sort(nodes);

            return(nodes.Where(b => b.Tags.Contains(tag)).Skip(startIndex).Take(pageSize));
        }
예제 #3
0
        public IEnumerable <IBlogArticle> GetAllBlogArticlesWithTag(string tag, int parentNodeId, Sorting.Interfaces.ISorter sorter)
        {
            var nodes = GetAllBlogArticles(parentNodeId);

            var sortedNodes = sorter.Sort(nodes);

            return(sortedNodes.Where(b => b.Tags.Contains(tag)));
        }
예제 #4
0
        public IEnumerable <IBlogArticle> GetAllBlogArticles(int parentNodeId, Sorting.Interfaces.ISorter sorter)
        {
            var nodes = GetAllBlogArticles(parentNodeId);

            return(sorter.Sort <IBlogArticle>(nodes));
        }
예제 #5
0
        public IEnumerable <IBlogArticle> GetAllBlogArticles(Sorting.Interfaces.ISorter sorter)
        {
            var nodes = GetAllBlogArticles();

            return(sorter.Sort <IBlogArticle>(nodes));
        }