public override object ReadObject(XmlReader reader) { AddressResponse AddressResponseField = null; if (IsParentStartElement(reader, false, true)) { AddressResponseField = new AddressResponse(); reader.Read(); if (IsChildStartElement(reader, "address", true, false)) { reader.Read(); AddressResponseField.address = reader.ReadString(); reader.ReadEndElement(); } if (IsChildStartElement(reader, "port", true, false)) { reader.Read(); AddressResponseField.port = reader.ReadString(); reader.ReadEndElement(); } if (IsChildStartElement(reader, "serverTime", false, false)) { reader.Read(); AddressResponseField.serverTime = XmlConvert.ToInt64(reader.ReadString()); reader.ReadEndElement(); } reader.ReadEndElement(); } return(AddressResponseField); }
public override object ReadObject(XmlReader reader) { keepAlive keepAliveField = null; if (IsParentStartElement(reader, false, true)) { keepAliveField = new keepAlive(); reader.Read(); if (IsChildStartElement(reader, "myMacAddress", true, false)) { reader.Read(); keepAliveField.myMacAddress = reader.ReadString(); reader.ReadEndElement(); } if (IsChildStartElement(reader, "mycurrentTime", false, false)) { reader.Read(); keepAliveField.mycurrentTime = XmlConvert.ToInt64(reader.ReadString()); reader.ReadEndElement(); } if (IsChildStartElement(reader, "port", false, false)) { reader.Read(); keepAliveField.port = XmlConvert.ToInt32(reader.ReadString()); reader.ReadEndElement(); } reader.ReadEndElement(); } return(keepAliveField); }