Changeset 2037 for trunk/sources
- Timestamp:
- 06/09/09 17:15:47 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs
r1892 r2037 172 172 string tempfile = Path.GetTempFileName(); 173 173 DateTime start = DateTime.Now; 174 Serialize(obj, File.Create(tempfile), config, includeAssemblies, compression); 174 using (FileStream stream = File.Create(tempfile)) { 175 Serialize(obj, stream, config, includeAssemblies, compression); 176 } 175 177 Logger.Info(String.Format("serialization took {0} seconds with compression level {1}", 176 178 (DateTime.Now - start).TotalSeconds, compression)); … … 197 199 XmlGenerator generator = new XmlGenerator(); 198 200 using (ZipOutputStream zipStream = new ZipOutputStream(stream)) { 201 zipStream.IsStreamOwner = false; 199 202 zipStream.SetLevel(compression); 200 203 zipStream.PutNextEntry(new ZipEntry("data.xml"));
Note: See TracChangeset
for help on using the changeset viewer.