private static IEnumerable <AtomLink> ReplacePreviousLink( IEnumerable <AtomLink> links, UuidIri previousId) { return(links .Where(l => !AtomEventStream.IsPreviousFeedLink(l)) .Concat(new[] { AtomEventStream.CreatePreviousLinkFrom(previousId) })); }
private static AtomFeed CreatePreviousPageFrom( AtomFeed index, UuidIri previousId, DateTimeOffset now) { return(new AtomFeed( previousId, "Partial event stream", now, new AtomAuthor("Grean"), index.Entries, index.Links .Where(AtomEventStream.IsPreviousFeedLink) .Concat(new[] { AtomEventStream.CreateSelfLinkFrom(previousId) }))); }