Index: /branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StaticCache.cs
===================================================================
--- /branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StaticCache.cs	(revision 15856)
+++ /branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StaticCache.cs	(revision 15857)
@@ -166,12 +166,4 @@
     }
 
-    // mainly for testing
-    public void DeregisterType(Guid guid) {
-      lock (locker) {
-        type2Guid.Remove(guid2Type[guid]);
-        guid2Type.Remove(guid);
-      }
-    }
-
     public ITransformer GetTransformer(Guid guid) {
       return guid2Transformer[guid];
@@ -208,4 +200,16 @@
       return Enumerable.Empty<MethodInfo>();
     }
+
+    public IEnumerable<MethodInfo> GetStorableConversions(IList<Tuple<Guid, uint>> typeChain) {
+      foreach (var type in typeChain) {
+        var conversionMethod = (from methodInfo in GetStorableConversions(type.Item1)
+                                let attrib = StorableConversionAttribute.GetStorableConversionAttribute(methodInfo)
+                                where attrib.Version == type.Item2 && (attrib.Dependencies == null || 
+                                  attrib.Dependencies.All(x => typeChain.Any(y => y.Item1 == Guid.Parse(x.Key) && y.Item2 == x.Value)))
+                                select methodInfo).SingleOrDefault();
+        if (conversionMethod != null)
+          yield return conversionMethod;
+      }
+    }
   }
 }
Index: /branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StorableConversionAttribute.cs
===================================================================
--- /branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StorableConversionAttribute.cs	(revision 15856)
+++ /branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StorableConversionAttribute.cs	(revision 15857)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections.Generic;
 using System.Reflection;
 
@@ -28,8 +29,15 @@
     public Guid Guid { get; private set; }
     public uint Version { get; private set; }
+    public IDictionary<string, uint> Dependencies { get; private set; }
 
-    public StorableConversionAttribute(string guid, uint version) {
+    public StorableConversionAttribute(string guid, uint version = 1u)
+      : this(guid, version, null) { }
+    public StorableConversionAttribute(string guid, uint version = 1u, string baseGuid = "", uint baseVersion = 0u)
+      : this(guid, version, string.IsNullOrEmpty(baseGuid) ? null : new Dictionary<string, uint> { { baseGuid, baseVersion } }) { }
+
+    public StorableConversionAttribute(string guid, uint version = 1u, IDictionary<string, uint> dependencies = null) {
       this.Guid = new Guid(guid);
       this.Version = version;
+      this.Dependencies = dependencies;
     }
 
@@ -47,4 +55,7 @@
       return GetStorableConversionAttribute(mi).Version;
     }
+    public static IDictionary<string, uint> GetDependencies(MethodInfo mi) {
+      return GetStorableConversionAttribute(mi).Dependencies;
+    }
   }
 }
Index: /branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Transformers/Transformers.cs
===================================================================
--- /branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Transformers/Transformers.cs	(revision 15856)
+++ /branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Transformers/Transformers.cs	(revision 15857)
@@ -848,45 +848,36 @@
         typeVersions.Add(Tuple.Create(Guid.Parse(mapper.GetString(parentTypeVersions[i])), parentTypeVersions[i + 1]));
 
-      var originalType = type;
-      var originalTypeInfo = typeInfo;
-
-      foreach (var entry in typeVersions) {
-        var guid = entry.Item1;
-        var version = entry.Item2;
-
-        var conversionMethods = (from methodInfo in Mapper.StaticCache.GetStorableConversions(guid)
-                                 let attrib = StorableConversionAttribute.GetStorableConversionAttribute(methodInfo)
-                                 where attrib.Version >= version
-                                 orderby attrib.Version
-                                 select methodInfo).ToList();
-
-        uint targetVersion;
-
-        try {
-          type = Mapper.StaticCache.GetType(guid);
-          typeInfo = Mapper.StaticCache.GetTypeInfo(type);
-          targetVersion = typeInfo.StorableTypeAttribute.Version;
-        } catch (KeyNotFoundException) {
-          targetVersion = 0;
-        }
-
-        Dictionary<string, object> lastDict = new Dictionary<string, object>();
-        foreach (var conversionMethod in conversionMethods) {
-          if (StorableConversionAttribute.GetVersion(conversionMethod) != version)
-            throw new PersistenceException(string.Format("No conversion method defined for type {0} version {1}", guid, version));
-
-          lastDict = (Dictionary<string, object>)conversionMethod.Invoke(null, new object[] { dict });
-          foreach (var kvp in lastDict) dict[kvp.Key] = kvp.Value;
-
-          version++;
-        }
-
-        if (version < targetVersion)
-          throw new PersistenceException(string.Format("Missing one or more conversion methods for type {0} version {1}", guid, version));
+      while (true) {
+        var applicableConversion = Mapper.StaticCache.GetStorableConversions(typeVersions).FirstOrDefault();
+        if (applicableConversion == null) break;
+
+        Dictionary<string, object> newDict;
+        List<Tuple<string, uint>> typeChain = null;
+
+        var conversionParameters = applicableConversion.GetParameters();
+        if (conversionParameters.Length == 1) {
+          newDict = (Dictionary<string, object>)applicableConversion.Invoke(null, new object[] { dict });
+        } else if (conversionParameters.Length == 2) {
+          var parameters = new object[] { dict, typeChain };
+          newDict = (Dictionary<string, object>)applicableConversion.Invoke(null, parameters);
+          typeChain = (List<Tuple<string, uint>>)parameters[1];
+        } else throw new PersistenceException("Conversion method has an invalid signature.");
+
+        foreach (var kvp in newDict) dict[kvp.Key] = kvp.Value;
+
+        var convertedType = StorableConversionAttribute.GetGuid(applicableConversion);
+        var convertedVersion = StorableConversionAttribute.GetVersion(applicableConversion);
+
+        var index = typeVersions.FindIndex(x => x.Item1 == convertedType);
+        typeVersions.RemoveAt(index);
+        typeVersions.Insert(index, Tuple.Create(convertedType, convertedVersion + 1));
+
+        if (typeChain != null && typeChain.Any()) {
+          typeVersions.RemoveRange(index + 1, typeVersions.Count - (index + 1));
+          typeVersions.AddRange(typeChain.Select(x => Tuple.Create(Guid.Parse(x.Item1), x.Item2)));
+        }
       }
 
       var typeStack = new Stack<Tuple<Type, TypeInfo>>();
-      type = originalType;
-      typeInfo = originalTypeInfo;
 
       while (StorableTypeAttribute.IsStorableType(type)) {
Index: /branches/PersistenceReintegration/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCases.cs
===================================================================
--- /branches/PersistenceReintegration/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCases.cs	(revision 15856)
+++ /branches/PersistenceReintegration/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCases.cs	(revision 15857)
@@ -36,4 +36,5 @@
 using HeuristicLab.Persistence.Core.Tokens;
 using HeuristicLab.Persistence.Default.CompositeSerializers;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Default.DebugString;
 using HeuristicLab.Persistence.Default.Xml;
@@ -42,5 +43,4 @@
 using HeuristicLab.Tests;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Tests {
@@ -1030,4 +1030,5 @@
       public int Value3 { get; private set; }
       public int Value4 { get; private set; }
+
       [StorableConstructor]
       public AllPropertiesStorable(bool isDeserializing) {
Index: /branches/PersistenceReintegration/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCasesPersistenceNew.cs
===================================================================
--- /branches/PersistenceReintegration/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCasesPersistenceNew.cs	(revision 15856)
+++ /branches/PersistenceReintegration/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCasesPersistenceNew.cs	(revision 15857)
@@ -285,5 +285,4 @@
     public int y { get; set; }
   }
-
   #endregion
 
@@ -293,8 +292,21 @@
     #region Helpers
     private string tempFile;
+    private static Dictionary<Guid, Type> guid2Type;
+    private static Dictionary<Type, Guid> type2Guid;
+    private static Dictionary<Type, Persistence.TypeInfo> typeInfos;
+    private static PropertyInfo guidPropertyInfo = typeof(StorableTypeAttribute).GetProperty("Guid");
+
 
     [ClassInitialize]
     public static void Initialize(TestContext testContext) {
       ConfigurationService.Instance.Reset();
+
+      var guid2TypeFieldInfo = typeof(StaticCache).GetField("guid2Type", BindingFlags.NonPublic | BindingFlags.Instance);
+      var type2GuidFieldInfo = typeof(StaticCache).GetField("type2Guid", BindingFlags.NonPublic | BindingFlags.Instance);
+      var typeInfosFieldInfo = typeof(StaticCache).GetField("typeInfos", BindingFlags.NonPublic | BindingFlags.Instance);
+
+      guid2Type = (Dictionary<Guid, Type>)guid2TypeFieldInfo.GetValue(Mapper.StaticCache);
+      type2Guid = (Dictionary<Type, Guid>)type2GuidFieldInfo.GetValue(Mapper.StaticCache);
+      typeInfos = (Dictionary<Type, Persistence.TypeInfo>)typeInfosFieldInfo.GetValue(Mapper.StaticCache);
     }
 
@@ -310,4 +322,32 @@
       reader.Close();
       File.Delete(tempFile);
+    }
+
+    public static void RegisterType(Guid guid, Type type) {
+      Mapper.StaticCache.RegisterType(guid, type);
+    }
+
+    public static void DeregisterType(Type type) {
+      var typeInfo = GetTypeInfo(type);
+      type2Guid.Remove(guid2Type[typeInfo.StorableTypeAttribute.Guid]);
+      guid2Type.Remove(typeInfo.StorableTypeAttribute.Guid);
+    }
+
+    public static Persistence.TypeInfo GetTypeInfo(Type type) {
+      return Mapper.StaticCache.GetTypeInfo(type);
+    }
+
+    public static void RemoveTypeInfo(Type type) {
+      typeInfos.Remove(typeof(ConversionA));
+    }
+
+    public static Guid GetTypeGuid(Type type) {
+      var typeInfo = GetTypeInfo(type);
+      return typeInfo.StorableTypeAttribute.Guid;
+    }
+
+    public static void SetTypeGuid(Type type, Guid guid) {
+      var typeInfo = GetTypeInfo(type);
+      guidPropertyInfo.SetValue(typeInfo.StorableTypeAttribute, guid);
     }
     #endregion
@@ -455,7 +495,7 @@
     #endregion
 
-    #region Persistence 4.0 test methods
-    [TestMethod]
-    [TestCategory("Persistence4")]
+    #region Persistence 4.0 Test methods
+    [TestMethod]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestBool() {
@@ -472,5 +512,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestInt() {
@@ -487,5 +527,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestDouble() {
@@ -503,5 +543,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestFloat() {
@@ -519,5 +559,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestDecimal() {
@@ -535,5 +575,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestLong() {
@@ -551,5 +591,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestUInt() {
@@ -567,5 +607,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestShort() {
@@ -583,5 +623,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestByte() {
@@ -599,5 +639,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestEnumSimple() {
@@ -615,5 +655,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestEnumComplex() {
@@ -630,5 +670,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestType() {
@@ -645,5 +685,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestBytes() {
@@ -661,5 +701,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestSBytes() {
@@ -677,5 +717,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestChars() {
@@ -693,5 +733,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestShorts() {
@@ -709,5 +749,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestUShorts() {
@@ -725,5 +765,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestString() {
@@ -740,5 +780,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestColor() {
@@ -755,5 +795,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestPoint() {
@@ -771,5 +811,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestBoolArray() {
@@ -788,5 +828,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestIntArray() {
@@ -805,5 +845,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestLongArray() {
@@ -822,5 +862,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestDoubleArray() {
@@ -839,5 +879,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestObjectArray() {
@@ -863,5 +903,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestStack() {
@@ -883,5 +923,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestArrayOfStack() {
@@ -915,5 +955,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestIntValueArray() {
@@ -932,5 +972,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestIntValueArrayArray() {
@@ -949,8 +989,7 @@
     #endregion
 
-
-    #region Old persistence test methods
-    [TestMethod]
-    [TestCategory("Persistence4")]
+    #region Old Persistence Tests
+    [TestMethod]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void ComplexStorable() {
@@ -1042,5 +1081,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void SelfReferences() {
@@ -1070,5 +1109,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void ArrayCreation() {
@@ -1083,8 +1122,8 @@
       arrayListArray[2].Add(arrayListArray);
       arrayListArray[2].Add(arrayListArray);
-      //Array a = Array.CreateInstance(
-      //                        typeof(object),
-      //                        new[] { 1, 2 }, new[] { 3, 4 });
-      //arrayListArray[2].Add(a);
+      Array a = Array.CreateInstance(
+                              typeof(object),
+                              new[] { 1, 2 }, new[] { 3, 4 });
+      arrayListArray[2].Add(a);
       serializer.Serialize(arrayListArray, tempFile);
       object o = serializer.Deserialize(tempFile);
@@ -1100,5 +1139,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void CustomSerializationProperty() {
@@ -1117,5 +1156,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void Primitives() {
@@ -1130,5 +1169,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void MultiDimensionalArray() {
@@ -1161,5 +1200,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void NestedTypeTest() {
@@ -1176,5 +1215,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void SimpleArray() {
@@ -1189,5 +1228,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void PrimitiveRoot() {
@@ -1244,5 +1283,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void Enums() {
@@ -1260,5 +1299,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestAliasingWithOverriddenEquals() {
@@ -1278,5 +1317,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void NonDefaultConstructorTest() {
@@ -1291,5 +1330,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestSavingException() {
@@ -1308,5 +1347,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestTypeStringConversion() {
@@ -1320,5 +1359,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestHexadecimalPublicKeyToken() {
@@ -1330,5 +1369,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void InheritanceTest() {
@@ -1360,5 +1399,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void InstantiateParentChainReference() {
@@ -1378,13 +1417,4 @@
       int value;
       int PropertyValue { get; set; }
-
-      /*
-      [StorableConstructor]
-      public TestStruct(StorableConstructorFlag deserializing) {
-        value = 0;
-        PropertyValue = 0;
-      }
-      */
-
       public TestStruct(int value)
         : this() {
@@ -1395,5 +1425,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void StructTest() {
@@ -1406,5 +1436,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void PointTest() {
@@ -1417,5 +1447,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void NullableValueTypes() {
@@ -1431,5 +1461,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void BitmapTest() {
@@ -1465,5 +1495,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void HookTest() {
@@ -1491,5 +1521,5 @@
       }
       [StorableConstructor]
-      private CustomConstructor(StorableConstructorFlag deserializing) {
+      private CustomConstructor(StorableConstructorFlag _) {
         Value = "persistence";
       }
@@ -1497,5 +1527,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestCustomConstructor() {
@@ -1518,5 +1548,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestConstructorExceptionUnwrapping() {
@@ -1533,5 +1563,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestStreaming() {
@@ -1570,5 +1600,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestLinkInheritance() {
@@ -1589,8 +1619,6 @@
       public int Value4 { get; private set; }
       [StorableConstructor]
-      public AllFieldsStorable(StorableConstructorFlag isdeserializing) {
-      }
-
-      public void InitValues() {
+      private AllFieldsStorable(StorableConstructorFlag _) { }
+      public AllFieldsStorable() {
         Value1 = 12;
         Value2 = 23;
@@ -1601,10 +1629,9 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestStorableTypeDiscoveryAllFields() {
       ProtoBufSerializer serializer = new ProtoBufSerializer();
-      AllFieldsStorable afs = new AllFieldsStorable(default(StorableConstructorFlag));
-      afs.InitValues();
+      AllFieldsStorable afs = new AllFieldsStorable();
       serializer.Serialize(afs, tempFile);
       AllFieldsStorable newAfs = (AllFieldsStorable)serializer.Deserialize(tempFile);
@@ -1623,8 +1650,7 @@
       public int Value4 { get; private set; }
 
+      [StorableConstructor]
+      private AllPropertiesStorable(StorableConstructorFlag _) { }
       public AllPropertiesStorable() {
-      }
-
-      public void InitValues() {
         Value1 = 12;
         Value2 = 23;
@@ -1635,10 +1661,9 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestStorableTypeDiscoveryAllProperties() {
       ProtoBufSerializer serializer = new ProtoBufSerializer();
       AllPropertiesStorable afs = new AllPropertiesStorable();
-      afs.InitValues();
       serializer.Serialize(afs, tempFile);
       AllPropertiesStorable newAfs = (AllPropertiesStorable)serializer.Deserialize(tempFile);
@@ -1657,24 +1682,20 @@
       public int Value3 { get; private set; }
       public int Value4 { get; private set; }
-
+      [StorableConstructor]
+      private AllFieldsAndAllPropertiesStorable(StorableConstructorFlag _) { }
       public AllFieldsAndAllPropertiesStorable() {
-      }
-
-      public void InitValues() {
         Value1 = 12;
         Value2 = 23;
         Value3 = 34;
         Value4 = 56;
-
-      }
-    }
-
-    [TestMethod]
-    [TestCategory("Persistence4")]
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestStorableTypeDiscoveryAllFieldsAndAllProperties() {
       ProtoBufSerializer serializer = new ProtoBufSerializer();
       AllFieldsAndAllPropertiesStorable afs = new AllFieldsAndAllPropertiesStorable();
-      afs.InitValues();
       serializer.Serialize(afs, tempFile);
       AllFieldsAndAllPropertiesStorable newAfs = (AllFieldsAndAllPropertiesStorable)serializer.Deserialize(tempFile);
@@ -1692,8 +1713,7 @@
       public int Value3 { get; private set; }
       public int Value4 { get; private set; }
+      [StorableConstructor]
+      private MarkedOnlyStorable(StorableConstructorFlag _) { }
       public MarkedOnlyStorable() {
-      }
-
-      public void InitValues() {
         Value1 = 12;
         Value2 = 23;
@@ -1704,10 +1724,9 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestStorableTypeDiscoveryMarkedOnly() {
       ProtoBufSerializer serializer = new ProtoBufSerializer();
       MarkedOnlyStorable afs = new MarkedOnlyStorable();
-      afs.InitValues();
       serializer.Serialize(afs, tempFile);
       MarkedOnlyStorable newAfs = (MarkedOnlyStorable)serializer.Deserialize(tempFile);
@@ -1719,5 +1738,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestLineEndings() {
@@ -1736,5 +1755,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestSpecialNumbers() {
@@ -1752,5 +1771,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestStringSplit() {
@@ -1776,5 +1795,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestHashSetSerializer() {
@@ -1797,5 +1816,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestConcreteDictionarySerializer() {
@@ -1838,5 +1857,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestReadOnlyFail() {
@@ -1861,5 +1880,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestWriteOnlyFail() {
@@ -1874,39 +1893,39 @@
     }
 
-    [StorableType("8052D9E3-6DDD-4AE1-9B5B-67C6D5436512")]
-    public class OneWayTest {
-      public OneWayTest() { this.value = "default"; }
-      public string value;
-      [Storable(AllowOneWay = true)]
-      public string ReadOnly {
-        get { return "ReadOnly"; }
-      }
-      [Storable(AllowOneWay = true)]
-      public string WriteOnly {
-        set { this.value = value; }
-      }
-    }
-
-    //TODO
-    /* [TestMethod]
-     [TestCategory("Persistence4")]
-     [TestProperty("Time", "short")]
-     public void TestTypeCacheExport() {
-       ProtoBufSerializer serializer = new ProtoBufSerializer();
-       var test = new List<List<int>>();
-       test.Add(new List<int>() { 1, 2, 3 });
-       IEnumerable<Type> types;
-       using (var stream = new MemoryStream()) {
-         XmlGenerator.Serialize(test, stream, ConfigurationService.Instance.GetConfiguration(new XmlFormat()), false, out types);
-       }
-       List<Type> t = new List<Type>(types);
-       // Assert.IsTrue(t.Contains(typeof(int))); not serialized as an int list is directly transformed into a string
-       Assert.IsTrue(t.Contains(typeof(List<int>)));
-       Assert.IsTrue(t.Contains(typeof(List<List<int>>)));
-       Assert.AreEqual(t.Count, 2);
-     }*/
-
-    [TestMethod]
-    [TestCategory("Persistence4")]
+    // TODO
+    //[StorableType("8052D9E3-6DDD-4AE1-9B5B-67C6D5436512")]
+    //public class OneWayTest {
+    //  public OneWayTest() { this.value = "default"; }
+    //  public string value;
+    //  [Storable(AllowOneWay = true)]
+    //  public string ReadOnly {
+    //    get { return "ReadOnly"; }
+    //  }
+    //  [Storable(AllowOneWay = true)]
+    //  public string WriteOnly {
+    //    set { this.value = value; }
+    //  }
+    //}
+
+    //[TestMethod]
+    //[TestCategory("PersistenceNew")]
+    //[TestProperty("Time", "short")]
+    //public void TestTypeCacheExport() {
+    //  ProtoBufSerializer serializer = new ProtoBufSerializer();
+    //  var test = new List<List<int>>();
+    //  test.Add(new List<int>() { 1, 2, 3 });
+    //  IEnumerable<Type> types;
+    //  using (var stream = new MemoryStream()) {
+    //    XmlGenerator.Serialize(test, stream, ConfigurationService.Instance.GetConfiguration(new XmlFormat()), false, out types);
+    //  }
+    //  List<Type> t = new List<Type>(types);
+    //  // Assert.IsTrue(t.Contains(typeof(int))); not serialized as an int list is directly transformed into a string
+    //  Assert.IsTrue(t.Contains(typeof(List<int>)));
+    //  Assert.IsTrue(t.Contains(typeof(List<List<int>>)));
+    //  Assert.AreEqual(t.Count, 2);
+    //}
+
+    [TestMethod]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TupleTest() {
@@ -1922,5 +1941,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void FontTest() {
@@ -1941,5 +1960,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "medium")]
     public void ConcurrencyTest() {
@@ -1960,5 +1979,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "medium")]
     public void ConcurrentBitmapTest() {
@@ -1992,7 +2011,6 @@
     }
 
-
-    [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestMethod]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestSpecialCharacters() {
@@ -2005,5 +2023,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestByteArray() {
@@ -2019,5 +2037,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestOptionalNumberEnumerable() {
@@ -2030,5 +2048,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestOptionalDateTimeEnumerable() {
@@ -2042,5 +2060,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestStringEnumerable() {
@@ -2053,5 +2071,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestUnicodeCharArray() {
@@ -2064,5 +2082,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestUnicode() {
@@ -2075,5 +2093,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestQueue() {
@@ -2086,4 +2104,5 @@
     #endregion
 
+    #region New Persistence Tests
     [StorableType("6075F1E8-948A-4AD8-8F5A-942B777852EC")]
     public class A {
@@ -2106,5 +2125,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestCyclicReferencesWithTuple() {
@@ -2248,5 +2267,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestConversion() {
@@ -2266,20 +2285,12 @@
       var old = test();
       serializer.Serialize(old, tempFile);
-      Mapper.StaticCache.DeregisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(V1)).Guid);
-      Mapper.StaticCache.DeregisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(V2)).Guid);
-      Mapper.StaticCache.DeregisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(V3)).Guid);
-      Mapper.StaticCache.RegisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(V1)).Guid, typeof(V3));
-
-      var typeInfosField = typeof(StaticCache).GetField("typeInfos", BindingFlags.NonPublic | BindingFlags.Instance);
-      var typeInfos = (Dictionary<Type, Persistence.TypeInfo>)typeInfosField.GetValue(Mapper.StaticCache);
-
-      var guidPI = typeof(StorableTypeAttribute).GetProperty("Guid");
-      var convPI = typeof(Persistence.TypeInfo).GetProperty("ConversionMethods");
-
-      var oldBInfo = typeInfos[typeof(V1)];
-      var newBInfo = Mapper.StaticCache.GetTypeInfo(typeof(V3));
-      guidPI.SetValue(newBInfo.StorableTypeAttribute, oldBInfo.StorableTypeAttribute.Guid);
-      //convPI.SetValue(newBInfo, oldBInfo.ConversionMethods);
-      typeInfos.Remove(typeof(V1));
+
+      DeregisterType(typeof(V1));
+      DeregisterType(typeof(V2));
+      DeregisterType(typeof(V3));
+
+      RegisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(V1)).Guid, typeof(V3));
+      SetTypeGuid(typeof(V3), GetTypeGuid(typeof(V1)));
+      RemoveTypeInfo(typeof(V1));
 
       object o = serializer.Deserialize(tempFile);
@@ -2291,6 +2302,4 @@
       Assert.AreSame(restored, restored.mySelf);
       Assert.AreEqual(restored.PublicString, old.s);
-      //string msg = Profile(test);
-      //Console.WriteLine(msg);
     }
 
@@ -2298,5 +2307,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestGASerializeDeserializeExecute() {
@@ -2326,5 +2335,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestLoadingSamples() {
@@ -2413,5 +2422,5 @@
 
     [TestMethod]
-    [TestCategory("Persistence4")]
+    [TestCategory("PersistenceNew")]
     [TestProperty("Time", "short")]
     public void TestConversionCase1() {
@@ -2423,28 +2432,17 @@
       var old = test();
       serializer.Serialize(old, tempFile);
-      Mapper.StaticCache.DeregisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(ConversionB)).Guid);
-      Mapper.StaticCache.DeregisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(ConversionBNew)).Guid);
-      Mapper.StaticCache.DeregisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(ConversionA)).Guid);
-      Mapper.StaticCache.DeregisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(ConversionANew)).Guid);
-      Mapper.StaticCache.RegisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(ConversionB)).Guid, typeof(ConversionBNew));
-      Mapper.StaticCache.RegisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(ConversionA)).Guid, typeof(ConversionANew));
-
-      var typeInfosField = typeof(StaticCache).GetField("typeInfos", BindingFlags.NonPublic | BindingFlags.Instance);
-      var typeInfos = (Dictionary<Type, Persistence.TypeInfo>)typeInfosField.GetValue(Mapper.StaticCache);
-
-      var guidPI = typeof(StorableTypeAttribute).GetProperty("Guid");
-      var convPI = typeof(Persistence.TypeInfo).GetProperty("ConversionMethods");
-
-      var oldAInfo = typeInfos[typeof(ConversionA)];
-      var newAInfo = Mapper.StaticCache.GetTypeInfo(typeof(ConversionANew));
-      guidPI.SetValue(newAInfo.StorableTypeAttribute, oldAInfo.StorableTypeAttribute.Guid);
-      //convPI.SetValue(newAInfo, oldAInfo.ConversionMethods);
-      typeInfos.Remove(typeof(ConversionA));
-
-      var oldBInfo = typeInfos[typeof(ConversionB)];
-      var newBInfo = Mapper.StaticCache.GetTypeInfo(typeof(ConversionBNew));
-      guidPI.SetValue(newBInfo.StorableTypeAttribute, oldBInfo.StorableTypeAttribute.Guid);
-      //convPI.SetValue(newBInfo, oldBInfo.ConversionMethods);
-      typeInfos.Remove(typeof(ConversionB));
+
+      DeregisterType(typeof(ConversionB));
+      DeregisterType(typeof(ConversionBNew));
+      DeregisterType(typeof(ConversionA));
+      DeregisterType(typeof(ConversionANew));
+
+      RegisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(ConversionA)).Guid, typeof(ConversionANew));
+      SetTypeGuid(typeof(ConversionANew), GetTypeGuid(typeof(ConversionA)));
+      RemoveTypeInfo(typeof(ConversionA));
+
+      RegisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(ConversionB)).Guid, typeof(ConversionBNew));
+      SetTypeGuid(typeof(ConversionBNew), GetTypeGuid(typeof(ConversionB)));
+      RemoveTypeInfo(typeof(ConversionB));
 
       object o = serializer.Deserialize(tempFile);
@@ -2453,4 +2451,187 @@
       Assert.AreEqual(restored.BaseG, old.BaseF);
     }
+
+    [StorableType("90470973-4559-428E-AF28-DD95866B0A84")]
+    private class A0 {
+      [Storable]
+      public int x;
+    }
+
+    [StorableType("00000000-0000-0000-0000-0000000000A1", 2)]
+    private class A1 {
+      [Storable]
+      public int y;
+    }
+
+    [StorableType("847DD840-3EE3-4A01-AC60-FD7E71ED05F8")]
+    private class B0 {
+      [Storable]
+      public int x;
+    }
+
+    [StorableType("00000000-0000-0000-0000-0000000000B1", 2)]
+    private class B1 : A0 { }
+
+    [StorableType("00000000-0000-0000-0000-0000000000B2", 3)]
+    private class B2 {
+      [Storable]
+      public int x;
+    }
+
+    private static class ConversionsA2A_B2B {
+      [StorableConversion("847DD840-3EE3-4A01-AC60-FD7E71ED05F8", 1, baseGuid: "90470973-4559-428E-AF28-DD95866B0A84", baseVersion: 1)]
+      private static Dictionary<string, object> ConvertB0_B1(Dictionary<string, object> values) {
+        var newValues = new Dictionary<string, object>();
+        newValues["90470973-4559-428E-AF28-DD95866B0A84.x"] = values["847DD840-3EE3-4A01-AC60-FD7E71ED05F8.x"];
+        return newValues;
+      }
+
+      [StorableConversion("90470973-4559-428E-AF28-DD95866B0A84", 1)]
+      private static Dictionary<string, object> ConvertA0_A1(Dictionary<string, object> values) {
+        var newValues = new Dictionary<string, object>();
+        newValues["90470973-4559-428E-AF28-DD95866B0A84.y"] = values["90470973-4559-428E-AF28-DD95866B0A84.x"];
+        return newValues;
+      }
+
+      [StorableConversion("847DD840-3EE3-4A01-AC60-FD7E71ED05F8", 2)]
+      private static Dictionary<string, object> ConvertB1_B2(Dictionary<string, object> values) {
+        var newValues = new Dictionary<string, object>();
+        newValues["847DD840-3EE3-4A01-AC60-FD7E71ED05F8.x"] = values["90470973-4559-428E-AF28-DD95866B0A84.y"];
+        return newValues;
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("PersistenceNew")]
+    [TestProperty("Time", "short")]
+    public void TestConversionCase2() {
+      var test = new Func<B0>(() => {
+        return new B0() { x = 17 };
+      });
+
+      ProtoBufSerializer serializer = new ProtoBufSerializer();
+      var old = test();
+      serializer.Serialize(old, tempFile);
+
+      DeregisterType(typeof(B0));
+      DeregisterType(typeof(B1));
+      DeregisterType(typeof(B2));
+      DeregisterType(typeof(A0));
+      DeregisterType(typeof(A1));
+
+      RegisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(B0)).Guid, typeof(B2));
+      SetTypeGuid(typeof(B2), GetTypeGuid(typeof(B0)));
+      RemoveTypeInfo(typeof(B0));
+
+      RegisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(A0)).Guid, typeof(A1));
+      SetTypeGuid(typeof(A1), GetTypeGuid(typeof(A0)));
+      RemoveTypeInfo(typeof(A0));
+
+      object o = serializer.Deserialize(tempFile);
+      var restored = (B2)o;
+      Assert.AreEqual(restored.x, old.x);
+    }
+
+    #region Inheritance Chain Test
+    [StorableType("C1BFC249-89F6-45E2-8DFB-DA95E1BE9B95")]
+    private class InheritanceA0 {
+      [Storable]
+      public int x;
+    }
+
+    [StorableType("00000000-0000-0000-0000-0000000001A1", 2)]
+    private class InheritanceA1 {
+      [Storable]
+      public int y;
+    }
+
+    [StorableType("28A5F6B8-49AF-4C6A-AF0E-F92EB4511722", 1)]
+    private class InheritanceC0 {
+      [Storable]
+      public int x;
+    }
+
+    [StorableType("00000000-0000-0000-0000-0000000001C1", 2)]
+    private class InheritanceC1 {
+      [Storable]
+      public int x;
+    }
+
+    [StorableType("41108958-227D-43C4-B049-80AD0D3DB7F6")]
+    private class InheritanceB0 : InheritanceA0 {
+      //[Storable]
+      //public int x;
+    }
+
+    [StorableType("00000000-0000-0000-0000-0000000001B1", 2)]
+    private class InheritanceB1 : InheritanceC1 { }
+
+    private static class InheritanceConversionsA2A_B2B {
+      [StorableConversion("C1BFC249-89F6-45E2-8DFB-DA95E1BE9B95", 1)]
+      private static Dictionary<string, object> ConvertA0_A1(Dictionary<string, object> values) {
+        var newValues = new Dictionary<string, object>();
+        newValues["C1BFC249-89F6-45E2-8DFB-DA95E1BE9B95.y"] = values["C1BFC249-89F6-45E2-8DFB-DA95E1BE9B95.x"];
+        return newValues;
+      }
+
+      [StorableConversion("41108958-227D-43C4-B049-80AD0D3DB7F6", 1, baseGuid: "C1BFC249-89F6-45E2-8DFB-DA95E1BE9B95", baseVersion: 2)]
+      private static Dictionary<string, object> ConvertB0_B1(Dictionary<string, object> values, out List<Tuple<string, uint>> typeChain) {
+        typeChain = new List<Tuple<string, uint>> {
+          Tuple.Create("28A5F6B8-49AF-4C6A-AF0E-F92EB4511722", 1u)
+        };
+
+        var newValues = new Dictionary<string, object>();
+        newValues["41108958-227D-43C4-B049-80AD0D3DB7F6.x"] = values["C1BFC249-89F6-45E2-8DFB-DA95E1BE9B95.y"];
+        newValues["28A5F6B8-49AF-4C6A-AF0E-F92EB4511722.x"] = values["C1BFC249-89F6-45E2-8DFB-DA95E1BE9B95.y"];
+        return newValues;
+      }
+
+      [StorableConversion("28A5F6B8-49AF-4C6A-AF0E-F92EB4511722", 1)]
+      private static Dictionary<string, object> ConvertC0_C1(Dictionary<string, object> values) {
+        var newValues = new Dictionary<string, object>();
+        newValues["41108958-227D-43C4-B049-80AD0D3DB7F6.x"] = (int)values["41108958-227D-43C4-B049-80AD0D3DB7F6.x"] * 2;
+        return newValues;
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("PersistenceNew")]
+    [TestProperty("Time", "short")]
+    public void TestInheritanceConversionCase1() {
+      var test = new Func<InheritanceB0>(() => {
+        return new InheritanceB0() { x = 17 };
+      });
+
+      ProtoBufSerializer serializer = new ProtoBufSerializer();
+      var old = test();
+      serializer.Serialize(old, tempFile);
+
+      DeregisterType(typeof(InheritanceB0));
+      DeregisterType(typeof(InheritanceB1));
+      DeregisterType(typeof(InheritanceA0));
+      DeregisterType(typeof(InheritanceA1));
+      DeregisterType(typeof(InheritanceC0));
+      DeregisterType(typeof(InheritanceC1));
+
+      RegisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(InheritanceA0)).Guid, typeof(InheritanceA1));
+      SetTypeGuid(typeof(InheritanceA1), GetTypeGuid(typeof(InheritanceA0)));
+      RemoveTypeInfo(typeof(InheritanceA0));
+
+      RegisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(InheritanceB0)).Guid, typeof(InheritanceB1));
+      SetTypeGuid(typeof(InheritanceB1), GetTypeGuid(typeof(InheritanceB0)));
+      RemoveTypeInfo(typeof(InheritanceB0));
+
+      RegisterType(StorableTypeAttribute.GetStorableTypeAttribute(typeof(InheritanceC0)).Guid, typeof(InheritanceC1));
+      SetTypeGuid(typeof(InheritanceC1), GetTypeGuid(typeof(InheritanceC0)));
+      RemoveTypeInfo(typeof(InheritanceC0));
+
+      object o = serializer.Deserialize(tempFile);
+      var restoredC1 = (InheritanceC1)o;
+      var restoredB1 = (InheritanceB1)o;
+      Assert.AreEqual(old.x, restoredB1.x);
+      Assert.AreEqual(old.x * 2, restoredC1.x);
+    }
+    #endregion
+    #endregion
   }
 }
