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

TightMarshal2() public method

public TightMarshal2 ( OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs ) : void
wireFormat OpenWireFormat
o Object
dataOut System.IO.BinaryWriter
bs BooleanStream
return void
        public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs)
        {
            base.TightMarshal2(wireFormat, o, dataOut, bs);

            WireFormatInfo info = (WireFormatInfo)o;
            dataOut.Write(info.Magic, 0, 8);
            dataOut.Write(info.Version);
            if(bs.ReadBoolean()) {
                dataOut.Write(info.MarshalledProperties.Length);
                dataOut.Write(info.MarshalledProperties);
            }

            info.AfterMarshall(wireFormat);
        }