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)); }
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)); }
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))); }
public IEnumerable <IBlogArticle> GetAllBlogArticles(int parentNodeId, Sorting.Interfaces.ISorter sorter) { var nodes = GetAllBlogArticles(parentNodeId); return(sorter.Sort <IBlogArticle>(nodes)); }
public IEnumerable <IBlogArticle> GetAllBlogArticles(Sorting.Interfaces.ISorter sorter) { var nodes = GetAllBlogArticles(); return(sorter.Sort <IBlogArticle>(nodes)); }