public PartialViewResult SizeAnnotations(string widgetName, Include include) { var i = new FeedInclude(include); if (!i.Count.HasValue) i.Count = 6; FeedModel model = new FeedModel() { Feed = GetFeed(i, true) }; return PartialView(widgetName, model); }
public PartialViewResult FullFeed(string widgetName, Include include) { var i = new FeedInclude(include); if (!i.Count.HasValue) i.Count = int.MaxValue; FeedModel model = new FeedModel() { Feed = GetFeed(i, false) }; return PartialView(widgetName, model); }
protected AtomFeed GetFeed(FeedInclude include, bool isAnnotations) { Id id = (EntryId != null) ? EntryId : (Collection != null ? Collection.Id : null); if (include.Id != null) id = include.Id; if (id == null) throw new ArgumentException("Unable to determine feed based on include or context."); AtomFeed feed = !isAnnotations ? AtomPubService.GetFeed(id, 0, include.Count.Value) : AnnotateService.GetAnnotations(id, true, 0, include.Count ?? 10); if (!string.IsNullOrEmpty(include.Title)) { feed.Title = new AtomTitle() { Text = include.Title }; } return feed; }