public void Save([NotNull] XmlTextWriter output) { Assert.ArgumentNotNull(output, nameof(output)); output.WriteStartElement("validation"); output.WriteAttributeString("type", ((int)Type).ToString()); output.WriteAttributeString("severity", ((int)Severity).ToString()); output.WriteElementCData("code", Code); output.WriteElementString("category", Category); output.WriteElementString("title", Title); output.WriteElementCData("problem", Problem); output.WriteElementCData("solution", Solution); output.WriteElementCData("fix", Fix); output.WriteElementCData("whenexists", WhenExists ? "true" : "false"); output.WriteEndElement(); }