Apache.NMS.ActiveMQ.OpenWire.V6.MessageMarshaller.LooseUnmarshal C# (CSharp) Method

LooseUnmarshal() public method

public LooseUnmarshal ( OpenWireFormat wireFormat, Object o, BinaryReader dataIn ) : void
wireFormat OpenWireFormat
o Object
dataIn System.IO.BinaryReader
return void
        public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn)
        {
            base.LooseUnmarshal(wireFormat, o, dataIn);

            Message info = (Message)o;
            info.ProducerId = (ProducerId) LooseUnmarshalCachedObject(wireFormat, dataIn);
            info.Destination = (ActiveMQDestination) LooseUnmarshalCachedObject(wireFormat, dataIn);
            info.TransactionId = (TransactionId) LooseUnmarshalCachedObject(wireFormat, dataIn);
            info.OriginalDestination = (ActiveMQDestination) LooseUnmarshalCachedObject(wireFormat, dataIn);
            info.MessageId = (MessageId) LooseUnmarshalNestedObject(wireFormat, dataIn);
            info.OriginalTransactionId = (TransactionId) LooseUnmarshalCachedObject(wireFormat, dataIn);
            info.GroupID = LooseUnmarshalString(dataIn);
            info.GroupSequence = dataIn.ReadInt32();
            info.CorrelationId = LooseUnmarshalString(dataIn);
            info.Persistent = dataIn.ReadBoolean();
            info.Expiration = LooseUnmarshalLong(wireFormat, dataIn);
            info.Priority = dataIn.ReadByte();
            info.ReplyTo = (ActiveMQDestination) LooseUnmarshalNestedObject(wireFormat, dataIn);
            info.Timestamp = LooseUnmarshalLong(wireFormat, dataIn);
            info.Type = LooseUnmarshalString(dataIn);
            info.Content = ReadBytes(dataIn, dataIn.ReadBoolean());
            info.MarshalledProperties = ReadBytes(dataIn, dataIn.ReadBoolean());
            info.DataStructure = (DataStructure) LooseUnmarshalNestedObject(wireFormat, dataIn);
            info.TargetConsumerId = (ConsumerId) LooseUnmarshalCachedObject(wireFormat, dataIn);
            info.Compressed = dataIn.ReadBoolean();
            info.RedeliveryCounter = dataIn.ReadInt32();

            if (dataIn.ReadBoolean()) {
                short size = dataIn.ReadInt16();
                BrokerId[] value = new BrokerId[size];
                for( int i=0; i < size; i++ ) {
                    value[i] = (BrokerId) LooseUnmarshalNestedObject(wireFormat,dataIn);
                }
                info.BrokerPath = value;
            }
            else {
                info.BrokerPath = null;
            }
            info.Arrival = LooseUnmarshalLong(wireFormat, dataIn);
            info.UserID = LooseUnmarshalString(dataIn);
            info.RecievedByDFBridge = dataIn.ReadBoolean();
            info.Droppable = dataIn.ReadBoolean();

            if (dataIn.ReadBoolean()) {
                short size = dataIn.ReadInt16();
                BrokerId[] value = new BrokerId[size];
                for( int i=0; i < size; i++ ) {
                    value[i] = (BrokerId) LooseUnmarshalNestedObject(wireFormat,dataIn);
                }
                info.Cluster = value;
            }
            else {
                info.Cluster = null;
            }
            info.BrokerInTime = LooseUnmarshalLong(wireFormat, dataIn);
            info.BrokerOutTime = LooseUnmarshalLong(wireFormat, dataIn);
        }