Beispiel #1
0
        /// <summary>
        /// Write a collection object as CXML into the given stream.
        /// </summary>
        /// <param name="outputStream">The output stream.</param>
        /// <param name="collection">The collection.</param>
        public static void Serialize(Stream outputStream, Collection collection)
        {
            CxmlSerializer s = new CxmlSerializer(collection);

            using (XmlWriter writer = XmlWriter.Create(outputStream))
            {
                s.Write(writer);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Write a collection object as CXML into an XmlWriter.
        /// </summary>
        /// <param name="outputWriter">The output writer.</param>
        /// <param name="collection">The collection.</param>
        public static void Serialize(XmlWriter outputWriter, Collection collection)
        {
            CxmlSerializer s = new CxmlSerializer(collection);

            s.Write(outputWriter);
        }