/// <summary> /// Writes an Xml element containing the AutoUpdateChangeSummary specified /// </summary> /// <param name="changeSummary"></param> protected virtual void WriteChangeSummary(AutoUpdateChangeSummary changeSummary) { Debug.Assert(changeSummary != null); // start the element _writer.WriteStartElement(changeSummary.GetType().Name); XmlWriterUtils.WriteAttributes(_writer, new XmlStringPair("Type", changeSummary.Type.ToString()), new XmlStringPair("PostedBy", changeSummary.PostedBy), new XmlStringPair("DatePosted", changeSummary.DatePosted.ToString()), new XmlStringPair("Id", changeSummary.Id) ); XmlWriterUtils.WriteCDataElement(_writer, "Title", changeSummary.Title, null); XmlWriterUtils.WriteCDataElement(_writer, "Preview", changeSummary.Preview, null); // end the element _writer.WriteEndElement(); }
/// <summary> /// Writes an Xml element containing the AutoUpdateChangeSummary specified /// </summary> /// <param name="changeSummary"></param> private void WriteChangeSummary(AutoUpdateChangeSummary changeSummary) { if (changeSummary == null) { throw new ArgumentNullException("changeSummary"); } // start the element _writer.WriteStartElement(changeSummary.GetType().Name); XmlWriterUtils.WriteAttributes(_writer, new XmlStringPair("Type", changeSummary.Type.ToString()), new XmlStringPair("PostedBy", changeSummary.PostedBy), new XmlStringPair("DatePosted", changeSummary.DatePosted.ToString()), new XmlStringPair("Id", changeSummary.Id) ); XmlWriterUtils.WriteCDataElement(_writer, "Title", changeSummary.Title, null); XmlWriterUtils.WriteCDataElement(_writer, "Preview", changeSummary.Preview, null); // end the element _writer.WriteEndElement(); }
/// <summary> /// Writes an Xml element containing the AutoUpdateChangeSummary specified /// </summary> /// <param name="changeSummary"></param> private void WriteChangeSummary(AutoUpdateChangeSummary changeSummary) { if (changeSummary == null) throw new ArgumentNullException("changeSummary"); // start the element _writer.WriteStartElement(changeSummary.GetType().Name); XmlWriterUtils.WriteAttributes(_writer, new XmlStringPair("Type", changeSummary.Type.ToString()), new XmlStringPair("PostedBy", changeSummary.PostedBy), new XmlStringPair("DatePosted", changeSummary.DatePosted.ToString()), new XmlStringPair("Id", changeSummary.Id) ); XmlWriterUtils.WriteCDataElement(_writer, "Title", changeSummary.Title, null); XmlWriterUtils.WriteCDataElement(_writer, "Preview", changeSummary.Preview, null); // end the element _writer.WriteEndElement(); }