Apache.NMS.ActiveMQ.OpenWire.V6.WireFormatInfoMarshaller.LooseMarshal C# (CSharp) Method

LooseMarshal() public method

public LooseMarshal ( OpenWireFormat wireFormat, Object o, BinaryWriter dataOut ) : void
wireFormat OpenWireFormat
o Object
dataOut System.IO.BinaryWriter
return void
        public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut)
        {
            WireFormatInfo info = (WireFormatInfo)o;

            info.BeforeMarshall(wireFormat);

            base.LooseMarshal(wireFormat, o, dataOut);
            dataOut.Write(info.Magic, 0, 8);
            dataOut.Write(info.Version);
            dataOut.Write(info.MarshalledProperties!=null);
            if(info.MarshalledProperties!=null) {
               dataOut.Write(info.MarshalledProperties.Length);
               dataOut.Write(info.MarshalledProperties);
            }

            info.AfterMarshall(wireFormat);
        }