public override void WriteObject(XmlWriter writer, object graph) { keepAliveResponse keepAliveResponseField = ((keepAliveResponse)(graph)); if (WriteParentElement(writer, true, true, graph)) { if (WriteChildElement(writer, "keepAliveResult", false, false, keepAliveResponseField.keepAliveResult)) { writer.WriteString(XmlConvert.ToString(keepAliveResponseField.keepAliveResult)); writer.WriteEndElement(); } writer.WriteEndElement(); } return; }
public override object ReadObject(XmlReader reader) { keepAliveResponse keepAliveResponseField = null; if (IsParentStartElement(reader, false, true)) { keepAliveResponseField = new keepAliveResponse(); reader.Read(); if (IsChildStartElement(reader, "keepAliveResult", false, false)) { reader.Read(); keepAliveResponseField.keepAliveResult = XmlConvert.ToBoolean(reader.ReadString()); reader.ReadEndElement(); } reader.ReadEndElement(); } return(keepAliveResponseField); }