Example #1
0
        public override void WriteObject(XmlWriter writer, object graph)
        {
            isValidResponse isValidResponseField = ((isValidResponse)(graph));

            if (WriteParentElement(writer, true, true, graph))
            {
                if (WriteChildElement(writer, "isValidResult", false, false, isValidResponseField.isValidResult))
                {
                    writer.WriteString(XmlConvert.ToString(isValidResponseField.isValidResult));
                    writer.WriteEndElement();
                }
                writer.WriteEndElement();
            }
            return;
        }
Example #2
0
        public override object ReadObject(XmlReader reader)
        {
            isValidResponse isValidResponseField = null;

            if (IsParentStartElement(reader, false, true))
            {
                isValidResponseField = new isValidResponse();
                reader.Read();
                if (IsChildStartElement(reader, "isValidResult", false, false))
                {
                    reader.Read();
                    isValidResponseField.isValidResult = XmlConvert.ToBoolean(reader.ReadString());
                    reader.ReadEndElement();
                }
                reader.ReadEndElement();
            }
            return(isValidResponseField);
        }