Ejemplo n.º 1
0
        public FeedResult RSS2()
        {
            var data = _gameLog.GetAll();

            var feedItems = data.OrderByDescending(gle => gle.Timestamp).Select(gle => {
                var item = new SyndicationItem()
                {
                    Title = new TextSyndicationContent(gle.Description)
                };
                item.Authors.Add(new SyndicationPerson(gle.User));
                item.PublishDate = gle.Timestamp;
                //var link = HtmlHelper.GenerateLink
                //item.Links.Add()

                return(item);
            }
                                                                                );



            var feed       = new SyndicationFeed("kMagic Activity Feed", "Match Results", null, feedItems);
            var feedResult = new FeedResult(new Rss20FeedFormatter(feed));

            feedResult.ContentType = "text/rss";
            return(feedResult);
        }