Exemple #1
0
        private void WriteAtomEntry(IPublication publication, Stream writeStream)
        {
            var entry = publication.Syndicate();

            var formatter = new Atom10ItemFormatter(entry);

            using (var writer = XmlWriter.Create(writeStream)) {
                formatter.WriteTo(writer);
            }
        }
        /// <summary>
        /// Writes the atom entry to the specified stream.
        /// </summary>
        /// <param name="publication">The publication entry.</param>
        /// <param name="writeStream">The output write stream.</param>
        /// <param name="contentType">The media type header requested.</param>
        protected virtual void WriteEntry(IPublication publication, Stream writeStream, string contentType)
        {
            var entry     = publication.Syndicate();
            var formatter = GetFormatter(contentType, entry);

            using (var writer = XmlWriter.Create(writeStream))
            {
                formatter.WriteTo(writer);
            }
        }
        private void WriteAtomEntry(IPublication publication, Stream writeStream)
        {
            var entry = publication.Syndicate();

            var formatter = new Atom10ItemFormatter(entry);

            using (var writer = XmlWriter.Create(writeStream))
            {
                formatter.WriteTo(writer);
            }
        }