Apache.NMS.ActiveMQ.OpenWire.V6.DataArrayResponseMarshaller.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);

            DataArrayResponse info = (DataArrayResponse)o;

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