/// <summary> /// Visits a feed item. /// </summary> /// <param name="feed">The feed to visit.</param> protected override ODataPayloadElement VisitFeed(ODataResourceSet resourceCollection) { ExceptionUtilities.CheckArgumentNotNull(resourceCollection, "feed"); EntitySetInstance entitySet = new EntitySetInstance() { InlineCount = resourceCollection.Count, NextLink = resourceCollection.NextPageLink == null ? null : resourceCollection.NextPageLink.OriginalString }; if (resourceCollection.Id != null) { entitySet.AtomId(UriUtils.UriToString(resourceCollection.Id)); } // now check for the entries annotation on the feed IEnumerable <ODataResource> entries = resourceCollection.Entries(); if (entries != null) { foreach (ODataResource entry in entries) { entitySet.Add(this.Visit(entry)); } } return(entitySet); }
/// <summary> /// Visits a feed item. /// </summary> /// <param name="feed">The feed to visit.</param> protected virtual void VisitFeed(ODataResourceSet feed) { var entries = feed.Entries(); if (entries != null) { foreach (var entry in entries) { this.Visit(entry); } } }