Changeset 3944 for trunk/sources/HeuristicLab.Persistence/3.3/Default
- Timestamp:
- 06/24/10 11:15:27 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs
r3937 r3944 135 135 136 136 protected string CreateNode(string name, Dictionary<string, string> attributes, string content) { 137 StringBuilder sb = new StringBuilder(); 137 StringBuilder sb = new StringBuilder( 138 prefix.Length + name.Length + AttributeLength(attributes) + 2 139 + content.Length + name.Length + 5); 138 140 sb.Append(prefix); 139 141 AddXmlStartTag(sb, name, attributes); … … 155 157 AddTypeInfo(beginToken.TypeId, dict); 156 158 return CreateNodeStart(XmlStringConstants.COMPOSITE, dict); 157 159 158 160 } 159 161 … … 317 319 /// <param name="includeAssemblies">if set to <c>true</c> include needed assemblies.</param> 318 320 /// <param name="compression">The ZIP compression level.</param> 319 public static void Serialize(object obj, string filename, Configuration config, bool includeAssemblies, int compression) { 321 public static void Serialize(object obj, string filename, Configuration config, bool includeAssemblies, int compression) { 320 322 try { 321 323 string tempfile = Path.GetTempFileName(); … … 399 401 /// <param name="config">The configuration.</param> 400 402 /// <param name="includeAssemblies">if set to <c>true</c> include need assemblies.</param> 401 public static void Serialize(object obj, Stream stream, Configuration config, bool includeAssemblies) { 403 public static void Serialize(object obj, Stream stream, Configuration config, bool includeAssemblies) { 402 404 try { 403 405 using (StreamWriter writer = new StreamWriter(new GZipStream(stream, CompressionMode.Compress))) {
Note: See TracChangeset
for help on using the changeset viewer.