Esempio n. 1
0
        private SyndicationItem CreateSyndicationItem(IContent content)
        {
            var changeTrackable = content as IChangeTrackable;
            var changed         = DateTime.Now;
            var changedby       = string.Empty;

            if (changeTrackable != null)
            {
                changed   = changeTrackable.Saved;
                changedby = changeTrackable.ChangedBy;
            }

            var item = new SyndicationItem
            {
                Id              = content.ContentLink.ID.ToString(),
                Title           = new TextSyndicationContent(content.Name),
                Summary         = new TextSyndicationContent(FeedInformationHandler.SetItemDescription(content)),
                PublishDate     = changed,
                LastUpdatedTime = changed,
            };

            var mimeType = GetMimeType(content);
            Uri url      = GetItemUrl(content);

            item.Content = new UrlSyndicationContent(url, mimeType);
            item.AddPermalink(url);
            item.Authors.Add(new SyndicationPerson(string.Empty, changedby, string.Empty));

            return(item);
        }
Esempio n. 2
0
 public virtual string ItemDescripton(IContent content)
 {
     return(FeedInformationHandler.SetItemDescription(content));
 }