Ejemplo n.º 1
0
 private ArticleAbstract[] GetAbstractsForPageIndex(Category listName, int pageIndex)
 {
     IEnumerable<Article> articlesCurrentPage = GetLatest(listName, pageIndex * NextPreviousOptions.EntriesPerPageMaxCount, NextPreviousOptions.EntriesPerPageMaxCount);
     return articlesCurrentPage.Select(article =>
                                                 {
                                                     ArticleAbstract articleAbstract = new ArticleAbstract();
                                                     articleAbstract.InjectFrom(article);
                                                     return articleAbstract;
                                                 })
                               .ToArray();
 }
Ejemplo n.º 2
0
        private ArticleAbstract[] GetLatestAbstracts()
        {
            IEnumerable<Article> latestArticles = GetLatestNewsArticles();
            ArticleAbstract[] abstracts = latestArticles.Select(article =>
                                                            {
                                                                var articleAbstract = new ArticleAbstract();
                                                                articleAbstract.InjectFrom(article);
                                                                return articleAbstract;
                                                            })
                                                  .ToArray();

            return abstracts;
        }