Beispiel #1
0
        private static void SetEntryProperties(string stream, long eventNumber, DateTime timestamp, Uri requestedUrl,
                                               EntryElement entry)
        {
            var escapedStreamId = Uri.EscapeDataString(stream);

            entry.SetTitle(eventNumber + "@" + stream);
            entry.SetId(HostName.Combine(requestedUrl, "/streams/{0}/{1}", escapedStreamId, eventNumber));
            entry.SetUpdated(timestamp);
            entry.SetAuthor(AtomSpecs.Author);
            entry.AddLink("edit",
                          HostName.Combine(requestedUrl, "/streams/{0}/{1}", escapedStreamId, eventNumber));
            entry.AddLink("alternate",
                          HostName.Combine(requestedUrl, "/streams/{0}/{1}", escapedStreamId, eventNumber));
        }