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

TightUnmarshal() public method

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

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

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

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