public override void SerializeAsXml(XmlWriter xmlWriter)
 {
     xmlWriter.WriteStartElement(nameof(SqlQuery));
     xmlWriter.WriteCData(this.SqlQuery);
     xmlWriter.WriteEndElement();
     if (this.ErrorMessage != null)
     {
         xmlWriter.WriteStartElement("ErrorMessage");
         xmlWriter.WriteCData(LinqTestOutput.FormatErrorMessage(ErrorMessage));
         xmlWriter.WriteEndElement();
     }
 }
Пример #2
0
        public override void SerializeAsXML(XmlWriter xmlWriter)
        {
            xmlWriter.WriteStartElement(nameof(SqlQuery));
            xmlWriter.WriteCData(this.SqlQuery);
            xmlWriter.WriteEndElement();
            if (this.errorMessage != null)
            {
                xmlWriter.WriteStartElement("ErrorMessage");
                xmlWriter.WriteCData(LinqTestOutput.FormatErrorMessage(errorMessage));
                xmlWriter.WriteEndElement();
            }

            if (this.failed)
            {
                xmlWriter.WriteElementString("Failed", this.failed.ToString());
            }
        }