Serialize() public method

public Serialize ( ) : void
return void
コード例 #1
0
 /// <summary>
 /// Serializes the given messages to the given stream.
 /// </summary>
 public void Serialize(object message, Stream stream)
 {
     var messageType = mapper.GetMappedTypeFor(message.GetType());
     using (var serializer = new XmlSerialization(messageType, stream, message, conventions, cache, SkipWrappingRawXml, Namespace))
     {
         serializer.Serialize();
     }
 }
コード例 #2
0
        /// <summary>
        /// Serializes the given messages to the given stream.
        /// </summary>
        public void Serialize(object message, Stream stream)
        {
            var messageType = mapper.GetMappedTypeFor(message.GetType());

            using (var serializer = new XmlSerialization(messageType, stream, message, conventions, cache, SkipWrappingRawXml, Namespace))
            {
                serializer.Serialize();
            }
        }