Apache.NMS.ActiveMQ.Commands.ActiveMQObjectMessage.BeforeMarshall C# (CSharp) Method

BeforeMarshall() public method

public BeforeMarshall ( OpenWireFormat wireFormat ) : void
wireFormat Apache.NMS.ActiveMQ.OpenWire.OpenWireFormat
return void
        public override void BeforeMarshall(OpenWireFormat wireFormat)
        {
            if (body == null)
            {
                Content = null;
            }
            else
            {
                MemoryStream stream = new MemoryStream();
                Formatter.Serialize(stream, body);
                Content = stream.ToArray();
            }

            //Console.WriteLine("BeforeMarshalling, content is: " + Content);

            base.BeforeMarshall(wireFormat);
        }