Apache.NMS.ActiveMQ.OpenWire.V3.BrokerInfoMarshaller.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);

            BrokerInfo info = (BrokerInfo)o;
            info.BrokerId = (BrokerId) LooseUnmarshalCachedObject(wireFormat, dataIn);
            info.BrokerURL = LooseUnmarshalString(dataIn);

            if (dataIn.ReadBoolean()) {
                short size = dataIn.ReadInt16();
                BrokerInfo[] value = new BrokerInfo[size];
                for( int i=0; i < size; i++ ) {
                    value[i] = (BrokerInfo) LooseUnmarshalNestedObject(wireFormat,dataIn);
                }
                info.PeerBrokerInfos = value;
            }
            else {
                info.PeerBrokerInfos = null;
            }
            info.BrokerName = LooseUnmarshalString(dataIn);
            info.SlaveBroker = dataIn.ReadBoolean();
            info.MasterBroker = dataIn.ReadBoolean();
            info.FaultTolerantConfiguration = dataIn.ReadBoolean();
            info.DuplexConnection = dataIn.ReadBoolean();
            info.NetworkConnection = dataIn.ReadBoolean();
            info.ConnectionId = LooseUnmarshalLong(wireFormat, dataIn);
            info.BrokerUploadUrl = LooseUnmarshalString(dataIn);
            info.NetworkProperties = LooseUnmarshalString(dataIn);
        }