Esempio n. 1
0
        public FeedEntryEntity(FeedEntryEntity entry)
        {
            CreatedDateTimeUTC = entry.CreatedDateTimeUTC;
            PublishedAt = entry.PublishedAt;

            PartitionKey = entry.PartitionKey;
            RowKey = entry.RowKey;
            Link = entry.Link;
            DocumentId = entry.DocumentId;
            Title = entry.Title;
            Description = entry.Description;
        }
Esempio n. 2
0
        public FeedEntryEntity Move(string feedName, string guid, string newFeedname)
        {
            Log.Information("Moving attachment {guid} from {feedName} to {newFeedname}", guid, feedName, newFeedname);
            var existingFeedEntry = _feedEntryQuery.GetFeedEntry(feedName, guid);

            _feedEntryRepository.Delete(existingFeedEntry);
            var newFeedEntry = new FeedEntryEntity(existingFeedEntry)
            {
                PartitionKey = newFeedname
            };
            var savedFeedEntry = _feedEntryRepository.Insert(newFeedEntry);

            if (savedFeedEntry.GetEntryType() == FeedEntryType.Attachment)
            {
                _attachmentService.Move(feedName, savedFeedEntry.RowKey, newFeedname);
            }

            return savedFeedEntry;
        }
Esempio n. 3
0
 public static FeedEntryEntity CreateFromLink(string feed, string link, string title)
 {
     var feedEntryEntity = new FeedEntryEntity(feed, title);
     feedEntryEntity.Link = link;
     return feedEntryEntity;
 }
Esempio n. 4
0
 public static FeedEntryEntity CreateFromAttachment(string feed, string title)
 {
     var feedEntryEntity = new FeedEntryEntity(feed, title);
     return feedEntryEntity;
 }