コード例 #1
0
        private static Article[][] GetRankingData(ArticleContainer container)
        {
            var data = container.Bundles.Where(b => b.Articles.Count >= 2).Select(b => b.Articles.OrderByDescending(a => a.Date.Ticks).ToArray());

            data = data.OrderByDescending(aa => aa.Length).ThenByDescending(aa => aa[0].Date.Ticks).Take(Settings.MaxRank);
            return(data.ToArray());
        }
コード例 #2
0
        private static void CreateRankingHtml(int interval)
        {
            var rssList   = GetRssList();
            var blogs     = GetBlogsFromRssList(rssList, interval);
            var container = new ArticleContainer();

            foreach (var blog in blogs)
            {
                foreach (var article in blog.Articles)
                {
                    container.Add(article);
                }
            }
            var rankingData = GetRankingData(container);

            OutputHtml(rankingData);
        }