public void saveObject(Saveable save, XmlWriter xmlWriter) { this.xmlWriter = xmlWriter; xmlWriter.WriteStartElement(DOCUMENT); saveControl.saveObject(save); xmlWriter.WriteEndElement(); saveControl.reset(); xmlWriter.Flush(); }
public void saveObject(Saveable save, JsonWriter jsonWriter) { this.jsonWriter = jsonWriter; try { jsonWriter.WriteStartArray(); saveControl.saveObject(save); jsonWriter.WriteEndArray(); jsonWriter.Flush(); } finally { saveControl.reset(); } }