コード例 #1
0
ファイル: Service.cs プロジェクト: Sarcares/PL_FEZ3
        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;
        }
コード例 #2
0
ファイル: Service.cs プロジェクト: Sarcares/PL_FEZ3
        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);
        }