/// <summary> /// Converts ParagraphElements into DDL. /// </summary> internal override void Serialize(Serializer serializer) { int count = Count; for (int index = 0; index < count; ++index) { DocumentObject element = this[index]; element.Serialize(serializer); } }
/// <summary> /// Converts DocumentElements into DDL. /// </summary> internal override void Serialize(Serializer serializer) { int count = Count; if (count == 1 && this[0] is Paragraph) { // Omit keyword if paragraph has no attributes set. Paragraph paragraph = (Paragraph)this[0]; if (paragraph.Style == "" && paragraph.IsNull("Format")) { paragraph.SerializeContentOnly = true; paragraph.Serialize(serializer); paragraph.SerializeContentOnly = false; return; } } for (int index = 0; index < count; index++) { DocumentObject documentElement = this[index]; documentElement.Serialize(serializer); } }
/// <summary> /// Writes the specified DocumentObject to DDL. /// </summary> public void WriteDocument(DocumentObject documentObject) { documentObject.Serialize(this.serializer); this.serializer.Flush(); }