/// <summary> /// save the current status of this snapshot out to a stream (file?) /// </summary> /// <param name="w"></param> public void save(System.IO.Stream w) { /* create the snapshot */ XmlSerializer s = new XmlSerializer(typeof(Revision)); RevisionIdx.iterator it = this._changesetIdx.begin(); for (; it != this._changesetIdx.end(); ++it) { s.Serialize(w, it.value()); w.Write(MAGIC_BYTES, 0, MAGIC_BYTES.Length); } w.Flush(); w.Close(); }
public static void WriteJsonToInternalStorage(System.IO.Stream fileStream, string json) { var jsonBytes = GetBytes(json); fileStream.Write(jsonBytes, 0, jsonBytes.Length); }