- Timestamp:
- 04/07/09 12:43:26 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence.Test/NewSerializationTest.cs
r1518 r1519 254 254 } 255 255 256 public class NestedType { 257 [Storable] 258 private string value = "value"; 259 } 260 261 public static void Test7() { 262 NestedType t = new NestedType(); 263 XmlGenerator.Serialize(t, "test7.zip"); 264 object o = XmlParser.DeSerialize("test7.zip"); 265 Console.WriteLine(ViewOnlyGenerator.Serialize(t)); 266 Console.WriteLine(ViewOnlyGenerator.Serialize(o)); 267 } 268 256 269 257 270 public static void Main() { … … 263 276 Test5(); 264 277 Test6(); 278 Test7(); 265 279 //SpeedTest(); 266 280 //SpeedTest2(); -
trunk/sources/HeuristicLab.Persistence/Core/TypeStringBuilder.cs
r1454 r1519 6 6 public static class TypeStringBuilder { 7 7 8 private static void BuildVersionInvariantName(Type type, StringBuilder sb) { 9 sb.Append(type.Namespace); 10 sb.Append('.'); 8 private static void BuildDeclaringTypeChain(Type type, StringBuilder sb) { 9 if ( type.DeclaringType != null ) { 10 BuildDeclaringTypeChain(type.DeclaringType, sb); 11 sb.Append(type.DeclaringType.Name).Append('+'); 12 } 13 } 14 15 private static void BuildVersionInvariantName(Type type, StringBuilder sb) { 16 sb.Append(type.Namespace).Append('.'); 17 BuildDeclaringTypeChain(type, sb); 11 18 sb.Append(type.Name); 12 19 if (type.IsGenericType) { … … 16 23 sb.Append("["); 17 24 BuildVersionInvariantName(args[i], sb); 18 sb.Append("]"); 19 sb.Append(","); 25 sb.Append("],"); 20 26 } 21 27 if (args.Length > 0) … … 23 29 sb.Append("]"); 24 30 } 25 sb.Append(", "); 26 sb.Append(type.Assembly.GetName().Name); 31 sb.Append(", ").Append(type.Assembly.GetName().Name); 27 32 } 28 33
Note: See TracChangeset
for help on using the changeset viewer.