Apache.NMS.ActiveMQ.OpenWire.V2.ProducerInfoMarshaller.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);

            ProducerInfo info = (ProducerInfo)o;
            info.ProducerId = (ProducerId) LooseUnmarshalCachedObject(wireFormat, dataIn);
            info.Destination = (ActiveMQDestination) LooseUnmarshalCachedObject(wireFormat, dataIn);

            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.DispatchAsync = dataIn.ReadBoolean();
        }