- Timestamp:
- 03/11/10 12:54:14 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs
r2718 r3004 11 11 namespace HeuristicLab.Persistence.Default.Xml { 12 12 13 14 /// <summary> 15 /// Main entry point of persistence to XML. Use the static methods to serialize 16 /// to a file or to a stream. 17 /// </summary> 13 18 public class XmlGenerator : GeneratorBase<string> { 14 19 … … 155 160 } 156 161 162 /// <summary> 163 /// Serialize an object into a file. 164 /// 165 /// The XML configuration is obtained from the <code>ConfigurationService</code>. 166 /// The file is actually a ZIP file. 167 /// Compression level is set to 5 and needed assemblies are not included. 168 /// </summary> 157 169 public static void Serialize(object o, string filename) { 158 Serialize(o, filename, ConfigurationService.Instance.GetDefaultConfig(new XmlFormat()), false, 5); 159 } 160 170 Serialize(o, filename, ConfigurationService.Instance.GetConfiguration(new XmlFormat()), false, 5); 171 } 172 173 /// <summary> 174 /// Serialize an object into a file. 175 /// 176 /// The XML configuration is obtained from the <code>ConfigurationService</code>. 177 /// Needed assemblies are not included. 178 /// </summary> 179 /// <param name="compression">ZIP file compression level</param> 161 180 public static void Serialize(object o, string filename, int compression) { 162 181 Serialize(o, filename, ConfigurationService.Instance.GetConfiguration(new XmlFormat()), false, compression); 163 182 } 183 164 184 165 185 public static void Serialize(object obj, string filename, Configuration config) {
Note: See TracChangeset
for help on using the changeset viewer.