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