Index: branches/New Persistence Exploration/Persistence/Persistence.sln
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence.sln	(revision 1356)
+++ branches/New Persistence Exploration/Persistence/Persistence.sln	(revision 1357)
@@ -2,7 +2,9 @@
 Microsoft Visual Studio Solution File, Format Version 10.00
 # Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Persistence", "Persistence\Persistence.csproj", "{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Persistence", "Persistence\HeuristicLab.Persistence.csproj", "{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{E2245078-6F40-449E-A370-01A97A7C5E6A}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Persistence.Test", "Test\HeuristicLab.Persistence.Test.csproj", "{E2245078-6F40-449E-A370-01A97A7C5E6A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.PluginInfrastructure", "..\..\..\trunk\sources\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj", "{94186A6A-5176-4402-AE83-886557B53CCA}"
 EndProject
 Global
@@ -26,4 +28,12 @@
 		{E2245078-6F40-449E-A370-01A97A7C5E6A}.Release|Any CPU.Build.0 = Release|Any CPU
 		{E2245078-6F40-449E-A370-01A97A7C5E6A}.Release|x86.ActiveCfg = Release|Any CPU
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Debug|x86.ActiveCfg = Debug|x86
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Debug|x86.Build.0 = Debug|x86
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Release|Any CPU.Build.0 = Release|Any CPU
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Release|x86.ActiveCfg = Release|x86
+		{94186A6A-5176-4402-AE83-886557B53CCA}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: branches/New Persistence Exploration/Persistence/Persistence/ArrayFormatters.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/ArrayFormatters.cs	(revision 1357)
+++ branches/New Persistence Exploration/Persistence/Persistence/ArrayFormatters.cs	(revision 1357)
@@ -0,0 +1,96 @@
+﻿using System.Collections;
+using System.Text;
+using HeuristicLab.Persistence.Interfaces;
+using System;
+
+namespace HeuristicLab.Persistence {
+
+
+  public abstract class NumberArray2XmlFormatter : IFormatter {
+
+    public abstract Type Type { get; }
+    public IFormat Format { get { return XmlFormat.Instance; } }
+    protected virtual string Separator { get { return ";"; } }
+    protected abstract string formatValue(object o);
+    protected abstract object parseValue(string o);
+
+    public object Serialize(object obj) {
+      Array a = (Array)obj;
+      StringBuilder sb = new StringBuilder();
+      sb.Append(a.Rank);
+      for (int i = 0; i < a.Rank; i++) {
+        sb.Append(Separator);
+        sb.Append(a.GetLength(i));
+      }
+      foreach (object o in a) {
+        sb.Append(Separator);
+        sb.Append(formatValue(o));
+      }
+      return sb.ToString();
+    }
+
+    public object DeSerialize(object o) {
+      IEnumerator values =
+        ((string)o)
+        .Split(new[] { Separator },
+        StringSplitOptions.RemoveEmptyEntries).GetEnumerator();
+      values.MoveNext();
+      int rank = int.Parse((string)values.Current);
+      int[] lengths = new int[rank];
+      for (int i = 0; i < rank; i++) {
+        values.MoveNext();
+        lengths[i] = int.Parse((string)values.Current);
+      }
+      Array a = Array.CreateInstance(this.Type.GetElementType(), lengths);
+      int[] positions = new int[rank];
+      while (values.MoveNext()) {
+        a.SetValue(parseValue((string)values.Current), positions);
+        positions[0] += 1;
+        for (int i = 0; i < rank - 1; i++) {
+          if (positions[i] >= lengths[i]) {
+            positions[i] = 0;
+            positions[i + 1] += 1;
+          } else {
+            break;
+          }
+        }
+      }
+      return a;
+    }
+  }
+
+
+  public class IntArray2XmlFormatter : NumberArray2XmlFormatter {
+    public override Type Type { get { return typeof(int[]); } }
+    protected override string formatValue(object o) { return o.ToString(); }
+    protected override object parseValue(string o) { return int.Parse(o); }
+  }
+
+
+  public class Int2DArray2XmlFormatter : IntArray2XmlFormatter {
+    public override Type Type { get { return typeof(int[,]); } }
+  }
+
+
+  public class Int3DArray2XmlFormatter : IntArray2XmlFormatter {
+    public override Type Type { get { return typeof(int[, ,]); } }
+  }
+
+
+  public class DoubleArray2XmlFormatter : NumberArray2XmlFormatter {
+    public override Type Type { get { return typeof(double[]); } }
+    protected override string formatValue(object o) { return ((double)o).ToString("r"); }
+    protected override object parseValue(string o) { return double.Parse(o); }
+  }
+
+
+  public class Double2DArray2XmlFormatter : DoubleArray2XmlFormatter {
+    public override Type Type { get { return typeof(double[,]); } }
+  }
+
+
+  public class Double3DArray2XmlFormatter : DoubleArray2XmlFormatter {
+    public override Type Type { get { return typeof(double[, ,]); } }
+  }
+  
+}
Index: branches/New Persistence Exploration/Persistence/Persistence/DeSerializer.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/DeSerializer.cs	(revision 1356)
+++ branches/New Persistence Exploration/Persistence/Persistence/DeSerializer.cs	(revision 1357)
@@ -1,61 +1,76 @@
 ﻿using System.Collections.Generic;
 using System;
+using HeuristicLab.Persistence.Interfaces;
 
-namespace Persistence {
+namespace HeuristicLab.Persistence {
+
+
+  struct ParentReference { }
+  delegate void Setter(object value);
+
+
+  interface IAccessibleObject {
+    object Obj { get; }
+    Setter GetSetter(string name);
+  }
+
+
+  class CustomObject : IAccessibleObject {
+
+    public object Obj { get; private set; }
+    public readonly List<object> customValues;
+
+    public CustomObject(object obj) {
+      Obj = obj;
+      customValues = new List<object>();
+    }
+
+    public void AddValue(object value) {
+      customValues.Add(value);
+    }
+
+    public Setter GetSetter(string name) {
+      int index = customValues.Count - 1;
+      return value => customValues[index] = value;
+    }
+  }
+
+
+  class CompositeObject : IAccessibleObject {
+
+    public object Obj { get; private set; }
+    public readonly Dictionary<string, DataMemberAccessor> accessorDict;
+
+    public CompositeObject(object obj, Dictionary<string, DataMemberAccessor> accessorDict) {
+      Obj = obj;
+      this.accessorDict = new Dictionary<string, DataMemberAccessor>();
+      foreach (KeyValuePair<string, DataMemberAccessor> pair in accessorDict) {
+        this.accessorDict.Add(
+          pair.Value.Name,
+          pair.Value);
+      }
+    }
+
+    public void SetValue(string name, object value) {
+      accessorDict[name].Set(value);
+      accessorDict.Remove(name);
+    }
+
+    public Setter GetSetter(string name) {
+      return value => accessorDict[name].Set(value);
+    }
+
+    public void PopulateDefaultValues() {
+      foreach (var pair in accessorDict) {
+        pair.Value.Set(pair.Value.DefaultValue);
+      }
+    }
+  }
+
 
   public class DeSerializer {
 
-    struct ParentReference { }
-
-    delegate void Setter(object value);
-
-    interface IAccessibleObject {
-      object Obj { get; }      
-      Setter GetSetter(string name);
-    }
-
-    class CustomObject : IAccessibleObject {
-      public object Obj { get; private set; }
-      public readonly List<object> customValues;
-      public CustomObject(object obj) {
-        Obj = obj;
-        customValues = new List<object>();
-      }
-      public void AddValue(object value) {
-        customValues.Add(value);
-      }
-      public Setter GetSetter(string name) {
-        int index = customValues.Count-1;
-        return value => customValues[index] = value;
-      }
-    }
-
-    class CompositeObject : IAccessibleObject {
-      public object Obj { get; private set; }
-      public readonly Dictionary<string, DataMemberAccessor> accessorDict;
-      public CompositeObject(object obj, Dictionary<string, DataMemberAccessor> accessorDict) {
-        Obj = obj;
-        this.accessorDict = new Dictionary<string, DataMemberAccessor>();
-        foreach (KeyValuePair<string, DataMemberAccessor> pair in accessorDict) {
-          this.accessorDict.Add(
-            pair.Value.Name,
-            pair.Value);
-        }
-      }
-      public void SetValue(string name, object value) {
-        accessorDict[name].Set(value);
-        accessorDict.Remove(name);
-      }
-      public Setter GetSetter(string name) {
-        return value => accessorDict[name].Set(value);
-      }
-      public void PopulateDefaultValues() {
-        foreach (var pair in accessorDict) {
-          pair.Value.Set(pair.Value.DefaultValue);
-        }        
-      }
-    }
-
     private delegate void Handler(ISerializationToken token);
+    private delegate void Thunk();
 
     private readonly Dictionary<int, object> id2obj;
@@ -63,7 +78,5 @@
     private readonly Stack<IAccessibleObject> compositeStack;
     private readonly PersistenceConfiguration persistenceConfiguration;
-    private readonly Dictionary<int, Type> typeIds;
-
-    delegate void Thunk();
+    private readonly Dictionary<int, Type> typeIds;    
     private List<Thunk> finalFixes;
 
@@ -115,4 +128,5 @@
         id2obj.Add((int)start.Id, instance);
     }
+
     private void CompositeEndHandler(ISerializationToken token) {
       EndToken end = (EndToken)token;
@@ -132,4 +146,5 @@
       }
     }
+
     private void PrimitiveHandler(ISerializationToken token) {
       PrimitiveToken primitive = (PrimitiveToken)token;
@@ -142,4 +157,5 @@
       SetValue(primitive.Name, value);
     }
+
     private void ReferenceHandler(ISerializationToken token) {
       ReferenceToken reference = (ReferenceToken)token;
@@ -152,8 +168,10 @@
       } 
     }
+
     private void NullHandler(ISerializationToken token) {
       NullReferenceToken nil = (NullReferenceToken)token;
       SetValue(nil.Name, null);
     }
+
     private void SetValue(string name, object value) {
       if (compositeStack.Count == 0) {
Index: branches/New Persistence Exploration/Persistence/Persistence/Decomposers.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/Decomposers.cs	(revision 1356)
+++ branches/New Persistence Exploration/Persistence/Persistence/Decomposers.cs	(revision 1357)
@@ -3,14 +3,8 @@
 using System.Reflection;
 using System.Collections.Generic;
-namespace Persistence {
+using HeuristicLab.Persistence.Interfaces;
+
+namespace HeuristicLab.Persistence {
   
-
-  public interface IDecomposer {
-    bool CanSerialize(Type type);
-    IEnumerable Serialize(object obj);
-    object DeSerialize(IEnumerable objects, Type type);
-  }
-
-
   public class EnumerableDecomposer : IDecomposer {
 
Index: branches/New Persistence Exploration/Persistence/Persistence/EnumerableFormatters.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/EnumerableFormatters.cs	(revision 1357)
+++ branches/New Persistence Exploration/Persistence/Persistence/EnumerableFormatters.cs	(revision 1357)
@@ -0,0 +1,56 @@
+﻿using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Persistence.Interfaces;
+using System;
+
+namespace HeuristicLab.Persistence {
+  
+
+  public abstract class NumberEnumeration2XmlFormatter : IFormatter {
+
+    public abstract Type Type { get; }
+    public IFormat Format { get { return XmlFormat.Instance; } }
+    protected virtual string Separator { get { return ";"; } }
+    protected abstract void Add(IEnumerable enumeration, object o);
+    protected abstract object Instantiate();
+    protected abstract string formatValue(object o);
+    protected abstract object parseValue(string o);
+
+    public object Serialize(object o) {
+      StringBuilder sb = new StringBuilder();
+      foreach (var value in (IEnumerable)o) {
+        sb.Append(formatValue(value));
+        sb.Append(Separator);
+      }
+      return sb.ToString();
+    }
+
+    public object DeSerialize(object o) {
+      IEnumerable enumeration = (IEnumerable)Instantiate();
+      string[] values = ((string)o).Split(new[] { Separator }, StringSplitOptions.RemoveEmptyEntries);
+      foreach (var value in values) {
+        Add(enumeration, parseValue(value));
+      }
+      return enumeration;
+    }
+  }
+
+
+  public class IntList2XmlFormatter : NumberEnumeration2XmlFormatter {
+    public override Type Type { get { return typeof(List<int>); } }
+    protected override void Add(IEnumerable enumeration, object o) { ((List<int>)enumeration).Add((int)o); }
+    protected override object Instantiate() { return new List<int>(); }
+    protected override string formatValue(object o) { return o.ToString(); }
+    protected override object parseValue(string o) { return int.Parse(o); }
+  }
+
+
+  public class DoubleList2XmlFormatter : NumberEnumeration2XmlFormatter {
+    public override Type Type { get { return typeof(List<double>); } }
+    protected override void Add(IEnumerable enumeration, object o) { ((List<double>)enumeration).Add((int)o); }
+    protected override object Instantiate() { return new List<double>(); }
+    protected override string formatValue(object o) { return ((double)o).ToString("r"); }
+    protected override object parseValue(string o) { return double.Parse(o); }
+  }
+}
Index: branches/New Persistence Exploration/Persistence/Persistence/HeuristicLab.Persistence.csproj
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/HeuristicLab.Persistence.csproj	(revision 1357)
+++ branches/New Persistence Exploration/Persistence/Persistence/HeuristicLab.Persistence.csproj	(revision 1357)
@@ -0,0 +1,93 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Persistence</RootNamespace>
+    <AssemblyName>Persistence</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <StartupObject>
+    </StartupObject>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ArrayFormatters.cs" />
+    <Compile Include="EnumerableFormatters.cs" />
+    <Compile Include="HeuristicLabPersistencePlugin.cs" />
+    <Compile Include="DeSerializer.cs" />
+    <Compile Include="Interfaces\IDecomposer.cs" />
+    <Compile Include="Interfaces\IFormatter.cs" />
+    <Compile Include="PersistenceConfiguration.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Serializer.cs" />
+    <Compile Include="Decomposers.cs" />
+    <Compile Include="PrimitiveFormatters.cs" />
+    <Compile Include="Interfaces\Tokens.cs" />
+    <Compile Include="Util.cs" />
+    <Compile Include="StorableAttribute.cs" />
+    <Compile Include="XmlFormatter.cs" />
+    <Compile Include="XmlParser.cs" />
+  </ItemGroup>
+  <PropertyGroup>
+    <PreBuildEvent>SubWCRev "$(ProjectDir)\" "$(ProjectDir)\Properties\AssemblyInfo.frame" "$(ProjectDir)\Properties\AssemblyInfo.cs"</PreBuildEvent>
+    <PostBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+REM call CopyAssemblies.cmd
+REM call UpdateLocalInstallation.cmd</PostBuildEvent>
+  </PropertyGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\trunk\sources\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+  </ItemGroup>
+</Project>
Index: branches/New Persistence Exploration/Persistence/Persistence/HeuristicLabPersistencePlugin.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/HeuristicLabPersistencePlugin.cs	(revision 1357)
+++ branches/New Persistence Exploration/Persistence/Persistence/HeuristicLabPersistencePlugin.cs	(revision 1357)
@@ -0,0 +1,9 @@
+﻿using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Persistence {
+
+  [ClassInfo(Name = "HeuristicLab.Persistence-3.0")]
+  [PluginFile(Filename = "HeuristicLab.Persistence-3.0.dll", Filetype = PluginFileType.Assembly)]
+  public class HeuristicLabPersistencePlugin : PluginBase {}
+
+}
Index: branches/New Persistence Exploration/Persistence/Persistence/Interfaces/IDecomposer.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/Interfaces/IDecomposer.cs	(revision 1357)
+++ branches/New Persistence Exploration/Persistence/Persistence/Interfaces/IDecomposer.cs	(revision 1357)
@@ -0,0 +1,12 @@
+﻿using System;
+using System.Collections;
+
+namespace HeuristicLab.Persistence.Interfaces {
+
+  public interface IDecomposer {
+    bool CanSerialize(Type type);
+    IEnumerable Serialize(object obj);
+    object DeSerialize(IEnumerable objects, Type type);
+  }
+
+}
Index: branches/New Persistence Exploration/Persistence/Persistence/Interfaces/IFormatter.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/Interfaces/IFormatter.cs	(revision 1357)
+++ branches/New Persistence Exploration/Persistence/Persistence/Interfaces/IFormatter.cs	(revision 1357)
@@ -0,0 +1,16 @@
+﻿using System;
+
+namespace HeuristicLab.Persistence.Interfaces {
+
+  public interface IFormat {
+    string Name { get; }
+  }
+
+  public interface IFormatter {
+    Type Type { get; }
+    IFormat Format { get; }
+    object Serialize(object o);
+    object DeSerialize(object o);
+  }
+
+}
Index: branches/New Persistence Exploration/Persistence/Persistence/Interfaces/Tokens.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/Interfaces/Tokens.cs	(revision 1357)
+++ branches/New Persistence Exploration/Persistence/Persistence/Interfaces/Tokens.cs	(revision 1357)
@@ -0,0 +1,57 @@
+﻿
+namespace HeuristicLab.Persistence.Interfaces {
+
+  public interface ISerializationToken {}
+
+  public class BeginToken : ISerializationToken {    
+    public readonly string Name;
+    public readonly int? TypeId;
+    public readonly int? Id;
+    public BeginToken(string name, int? typeId, int? id) {
+      Name = name;
+      TypeId = typeId;
+      Id = id;
+    }
+  }
+
+  public class EndToken : ISerializationToken {
+    public readonly string Name;
+    public readonly int? TypeId;
+    public readonly int? Id;
+    public EndToken(string name, int? typeId, int? id) {
+      Name = name;
+      TypeId = typeId;
+      Id = id;
+    }
+  }
+
+  public class PrimitiveToken : ISerializationToken {
+    public readonly string Name;
+    public readonly int? TypeId;
+    public readonly int? Id;
+    public readonly object SerialData;
+    public PrimitiveToken(string name, int? typeId, object serialData, int? id) {
+      Name = name;
+      TypeId = typeId;
+      SerialData = serialData;      
+      Id = id;
+    }
+  }
+
+  public class ReferenceToken : ISerializationToken {
+    public readonly string Name;
+    public readonly int Id;
+    public ReferenceToken(string name, int id) {
+      Name = name;
+      Id = id;
+    }
+  }
+
+  public class NullReferenceToken : ISerializationToken {
+    public readonly string Name;
+    public NullReferenceToken(string name) {
+      Name = name;
+    }
+  }
+
+}
Index: branches/New Persistence Exploration/Persistence/Persistence/Persistence.csproj
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/Persistence.csproj	(revision 1356)
+++ 	(revision )
@@ -1,76 +1,0 @@
-﻿<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.30729</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Persistence</RootNamespace>
-    <AssemblyName>Persistence</AssemblyName>
-    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <StartupObject>
-    </StartupObject>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>TRACE;DEBUG</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Core">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="System.Data" />
-    <Reference Include="System.Data.DataSetExtensions">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="DeSerializer.cs" />
-    <Compile Include="PersistenceConfiguration.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Serializer.cs" />
-    <Compile Include="Decomposers.cs" />
-    <Compile Include="PrimitiveFormatters.cs" />
-    <Compile Include="Test\NewSerializationTest.cs" />
-    <Compile Include="Tokens.cs" />
-    <Compile Include="Util.cs" />
-    <Compile Include="Test\StorableAttributeTests.cs" />
-    <Compile Include="StorableAttribute.cs" />
-    <Compile Include="Test\SerializationTest.cs" />
-    <Compile Include="XmlFormatter.cs" />
-    <Compile Include="XmlParser.cs" />
-  </ItemGroup>
-  <PropertyGroup>
-    <PreBuildEvent>SubWCRev "$(ProjectDir)\" "$(ProjectDir)\Properties\AssemblyInfo.frame" "$(ProjectDir)\Properties\AssemblyInfo.cs"</PreBuildEvent>
-  </PropertyGroup>
-  <ItemGroup>
-    <Folder Include="Interfaces\" />
-  </ItemGroup>
-</Project>
Index: branches/New Persistence Exploration/Persistence/Persistence/PersistenceConfiguration.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/PersistenceConfiguration.cs	(revision 1356)
+++ branches/New Persistence Exploration/Persistence/Persistence/PersistenceConfiguration.cs	(revision 1357)
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Reflection;
+using HeuristicLab.Persistence.Interfaces;
 
-namespace Persistence {
+namespace HeuristicLab.Persistence {
 
   public class PersistenceConfiguration {
Index: branches/New Persistence Exploration/Persistence/Persistence/PrimitiveFormatters.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/PrimitiveFormatters.cs	(revision 1356)
+++ branches/New Persistence Exploration/Persistence/Persistence/PrimitiveFormatters.cs	(revision 1357)
@@ -1,19 +1,8 @@
 ﻿using System;
-using System.Collections;
-using System.Collections.Generic;
 using System.Text;
 using System.Globalization;
-namespace Persistence {
+using HeuristicLab.Persistence.Interfaces;
 
-  public interface IFormat {
-    string Name { get; }
-  }
-
-  public interface IFormatter {
-    Type Type { get; }
-    IFormat Format { get; }
-    object Serialize(object o);
-    object DeSerialize(object o);
-  }
+namespace HeuristicLab.Persistence {
 
   public class XmlFormat : IFormat {
@@ -85,114 +74,4 @@
   }
 
-  public abstract class NumberArray2XmlFormatter : IFormatter {
-    public abstract Type Type { get; }
-    public IFormat Format { get { return XmlFormat.Instance; } }
-    protected virtual string Separator { get { return ";"; } }
-    protected abstract string formatValue(object o);
-    protected abstract object parseValue(string o);
-    public object Serialize(object obj) {      
-      Array a = (Array)obj;
-      StringBuilder sb = new StringBuilder();
-      sb.Append(a.Rank);      
-      for (int i = 0; i < a.Rank; i++) {
-        sb.Append(Separator);
-        sb.Append(a.GetLength(i));
-      }
-      foreach (object o in a) {
-        sb.Append(Separator);
-        sb.Append(formatValue(o));
-      }
-      return sb.ToString();
-    }
-    public object DeSerialize(object o) {
-      IEnumerator values =
-        ((string) o)
-        .Split(new[] {Separator},
-        StringSplitOptions.RemoveEmptyEntries).GetEnumerator();
-      values.MoveNext();
-      int rank = int.Parse((string)values.Current);
-      int[] lengths = new int[rank];
-      for ( int i = 0; i<rank; i++ ) {
-        values.MoveNext();
-        lengths[i] = int.Parse((string)values.Current);
-      }
-      Array a = Array.CreateInstance(this.Type.GetElementType(), lengths);
-      int[] positions = new int[rank];
-      while ( values.MoveNext() ) {
-        a.SetValue(parseValue((string)values.Current), positions);
-        positions[0] += 1;
-        for ( int i = 0; i<rank-1; i++) {
-          if (positions[i] >= lengths[i]) {
-            positions[i] = 0;
-            positions[i + 1] += 1;
-          } else {
-            break;
-          }
-        }
-      }
-      return a;
-    }
-  }
-  public class IntArray2XmlFormatter : NumberArray2XmlFormatter {
-    public override Type Type { get { return typeof(int[]); } }
-    protected override string formatValue(object o) { return o.ToString(); }
-    protected override object parseValue(string o) { return int.Parse(o); }
-  }
-  public class Int2DArray2XmlFormatter : IntArray2XmlFormatter {
-    public override Type Type { get { return typeof (int[,]); } }
-  }
-  public class Int3DArray2XmlFormatter : IntArray2XmlFormatter {
-    public override Type Type { get { return typeof(int[,,]); } }
-  }
-  public class DoubleArray2XmlFormatter : NumberArray2XmlFormatter {
-    public override Type Type { get { return typeof(double[]); } }
-    protected override string formatValue(object o) { return ((double) o).ToString("r"); }
-    protected override object parseValue(string o) { return double.Parse(o); }    
-  }
-  public class Double2DArray2XmlFormatter : DoubleArray2XmlFormatter {
-    public override Type Type { get { return typeof(double[,]); } }    
-  }
-  public class Double3DArray2XmlFormatter : DoubleArray2XmlFormatter {
-    public override Type Type { get { return typeof(double[,,]); } }
-  }
-
-  public abstract class NumberEnumeration2XmlFormatter : IFormatter {
-    public abstract Type Type { get; }
-    public IFormat Format { get { return XmlFormat.Instance; } }
-    protected virtual string Separator { get { return ";"; } }
-    protected abstract void Add(IEnumerable enumeration, object o);
-    protected abstract object Instantiate();
-    protected abstract string formatValue(object o);
-    protected abstract object parseValue(string o);    
-    public object Serialize(object o) {
-      StringBuilder sb = new StringBuilder();
-      foreach (var value in (IEnumerable) o) {        
-        sb.Append(formatValue(value));
-        sb.Append(Separator);
-      }
-      return sb.ToString();
-    }  
-    public object DeSerialize(object o) {
-      IEnumerable enumeration = (IEnumerable) Instantiate();        
-      string[] values = ((string) o).Split(new[] {Separator}, StringSplitOptions.RemoveEmptyEntries);
-      foreach ( var value in values ) {
-        Add(enumeration, parseValue(value));
-      }
-      return enumeration;
-    }
-  }
-  public class IntList2XmlFormatter : NumberEnumeration2XmlFormatter {
-    public override Type Type { get { return typeof(List<int>); } }
-    protected override void Add(IEnumerable enumeration, object o) { ((List<int>)enumeration).Add((int)o); }
-    protected override object Instantiate() { return new List<int>(); }
-    protected override string formatValue(object o) { return o.ToString(); }
-    protected override object parseValue(string o) { return int.Parse(o); }
-  }  
-  public class DoubleList2XmlFormatter : NumberEnumeration2XmlFormatter {
-    public override Type Type { get { return typeof(List<double>); } }
-    protected override void Add(IEnumerable enumeration, object o) { ((List<double>)enumeration).Add((int)o); }
-    protected override object Instantiate() { return new List<double>(); }
-    protected override string formatValue(object o) { return ((double) o).ToString("r"); }
-    protected override object parseValue(string o) { return double.Parse(o); }
-  }
+  
 }
Index: branches/New Persistence Exploration/Persistence/Persistence/Serializer.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/Serializer.cs	(revision 1356)
+++ branches/New Persistence Exploration/Persistence/Persistence/Serializer.cs	(revision 1357)
@@ -3,6 +3,7 @@
 using System;
 using System.Linq;
+using HeuristicLab.Persistence.Interfaces;
 
-namespace Persistence {
+namespace HeuristicLab.Persistence {
 
   public class Serializer : IEnumerable<ISerializationToken> {
@@ -46,22 +47,14 @@
     }
 
+    
     private IEnumerator<ISerializationToken> Serialize(DataMemberAccessor accessor) {
-
       object value = accessor.Get();
-
-      if (value == null) {
-        yield return new NullReferenceToken(accessor.Name);
-        yield break;
-      }
-
-      if (obj2id.ContainsKey(value)) {
-        yield return new ReferenceToken(accessor.Name, obj2id[value]);
-        yield break;
-      }
-      
+      if (value == null)
+        return NullReferenceEnumeration(accessor.Name);
+      if (obj2id.ContainsKey(value))
+        return ReferenceTokenEnumeration(accessor.Name, obj2id[value]);              
       if ( ! typeCache.ContainsKey(value.GetType()))
         typeCache.Add(value.GetType(), typeCache.Count);
       int typeId = typeCache[value.GetType()];
-
       int? id = null;
       if ( ! value.GetType().IsValueType) {
@@ -69,28 +62,37 @@
         obj2id.Add(value, (int)id);
       }
+      IFormatter formatter = persistenceConfiguration.GetFormatter(XmlFormat.Instance, value.GetType());
+      if (formatter != null)
+        return PrimitiveEnumeration(accessor.Name, typeId, formatter.Serialize(value), id);
+      IDecomposer decomposer = persistenceConfiguration.GetDecomposer(value.GetType()); 
+      if (decomposer != null)
+        return CompositeEnumeration(accessor.Name, decomposer.Serialize(value), id, typeId);            
+      return StorableEnumeration(accessor.Name, value, id, typeId);
+    }
 
-      IFormatter formatter = persistenceConfiguration.GetFormatter(XmlFormat.Instance, value.GetType());     
-      if (formatter != null) {
-        yield return new PrimitiveToken(
-          accessor.Name,
-          typeId,
-          formatter.Serialize(value),          
-          id);
-        yield break;
-      }
-      
-      yield return new BeginToken(accessor.Name, typeId, id);
-      IDecomposer decomposer = persistenceConfiguration.GetDecomposer(value.GetType());      
+    private IEnumerator<ISerializationToken> NullReferenceEnumeration(string name) {
+      yield return new NullReferenceToken(name);
+    }
 
-      if (decomposer != null) {
-        foreach (object o in decomposer.Serialize(value)) {
+    private IEnumerator<ISerializationToken> ReferenceTokenEnumeration(string name, int id) {
+      yield return new ReferenceToken(name, id);
+    }
+
+    private IEnumerator<ISerializationToken> PrimitiveEnumeration(string name, int typeId, object serializedValue, int? id) {
+      yield return new PrimitiveToken(name, typeId, serializedValue, id);
+    }
+
+    private IEnumerator<ISerializationToken> CompositeEnumeration(string name, IEnumerable values, int? id, int typeId) {
+      yield return new BeginToken(name, typeId, id);      
+        foreach (object o in values) {
           IEnumerator<ISerializationToken> iterator = Serialize(new DataMemberAccessor(o));
           while (iterator.MoveNext())
             yield return iterator.Current;
         }
-        yield return new EndToken(accessor.Name, typeId, id);
-        yield break;
-      }
+      yield return new EndToken(name, typeId, id);        
+    }
 
+    private IEnumerator<ISerializationToken> StorableEnumeration(string name, object value, int? id, int typeId) {            
+      yield return new BeginToken(name, typeId, id);
       int nSubComponents = 0;
       foreach (KeyValuePair<string, DataMemberAccessor> mapping in
@@ -107,7 +109,8 @@
                                          value.GetType().FullName));
       }
-      yield return new EndToken(accessor.Name, typeId, id);
+      yield return new EndToken(name, typeId, id);
     }
-    
   }
+
+
 }
Index: branches/New Persistence Exploration/Persistence/Persistence/StorableAttribute.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/StorableAttribute.cs	(revision 1356)
+++ branches/New Persistence Exploration/Persistence/Persistence/StorableAttribute.cs	(revision 1357)
@@ -3,6 +3,7 @@
 using System.Reflection;
 using System.Linq;
-
-namespace Persistence {
+using HeuristicLab.Persistence.Interfaces;
+
+namespace HeuristicLab.Persistence {
 
   [AttributeUsage(
Index: branches/New Persistence Exploration/Persistence/Persistence/Tokens.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/Tokens.cs	(revision 1356)
+++ 	(revision )
@@ -1,57 +1,0 @@
-﻿using System;
-namespace Persistence {
-
-  public interface ISerializationToken {}
-
-  public class BeginToken : ISerializationToken {    
-    public readonly string Name;
-    public readonly int? TypeId;
-    public readonly int? Id;
-    public BeginToken(string name, int? typeId, int? id) {
-      Name = name;
-      TypeId = typeId;
-      Id = id;
-    }
-  }
-
-  public class EndToken : ISerializationToken {
-    public readonly string Name;
-    public readonly int? TypeId;
-    public readonly int? Id;
-    public EndToken(string name, int? typeId, int? id) {
-      Name = name;
-      TypeId = typeId;
-      Id = id;
-    }
-  }
-
-  public class PrimitiveToken : ISerializationToken {
-    public readonly string Name;
-    public readonly int? TypeId;
-    public readonly int? Id;
-    public readonly object SerialData;
-    public PrimitiveToken(string name, int? typeId, object serialData, int? id) {
-      Name = name;
-      TypeId = typeId;
-      SerialData = serialData;      
-      Id = id;
-    }
-  }
-
-  public class ReferenceToken : ISerializationToken {
-    public readonly string Name;
-    public readonly int Id;
-    public ReferenceToken(string name, int id) {
-      Name = name;
-      Id = id;
-    }
-  }
-
-  public class NullReferenceToken : ISerializationToken {
-    public readonly string Name;
-    public NullReferenceToken(string name) {
-      Name = name;
-    }
-  }
-
-}
Index: branches/New Persistence Exploration/Persistence/Persistence/Util.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/Util.cs	(revision 1356)
+++ branches/New Persistence Exploration/Persistence/Persistence/Util.cs	(revision 1357)
@@ -4,5 +4,6 @@
 using System.Reflection;
 
-namespace Persistence {  
+namespace HeuristicLab.Persistence {  
+
   public class InterfaceInstantiatior {
     public static List<T> InstantiateAll<T>() {
Index: branches/New Persistence Exploration/Persistence/Persistence/XmlFormatter.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/XmlFormatter.cs	(revision 1356)
+++ branches/New Persistence Exploration/Persistence/Persistence/XmlFormatter.cs	(revision 1357)
@@ -2,5 +2,7 @@
 using System;
 using System.Text;
-namespace Persistence {
+using HeuristicLab.Persistence.Interfaces;
+
+namespace HeuristicLab.Persistence {
   public class XmlFormatter {
 
Index: branches/New Persistence Exploration/Persistence/Persistence/XmlParser.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/XmlParser.cs	(revision 1356)
+++ branches/New Persistence Exploration/Persistence/Persistence/XmlParser.cs	(revision 1357)
@@ -4,6 +4,7 @@
 using System.Collections;
 using System.IO;
+using HeuristicLab.Persistence.Interfaces;
 
-namespace Persistence {
+namespace HeuristicLab.Persistence {
 
 
Index: branches/New Persistence Exploration/Persistence/Test/HeuristicLab.Persistence.Test.csproj
===================================================================
--- branches/New Persistence Exploration/Persistence/Test/HeuristicLab.Persistence.Test.csproj	(revision 1357)
+++ branches/New Persistence Exploration/Persistence/Test/HeuristicLab.Persistence.Test.csproj	(revision 1357)
@@ -0,0 +1,60 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{E2245078-6F40-449E-A370-01A97A7C5E6A}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Test</RootNamespace>
+    <AssemblyName>Test</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <StartupObject>HeuristicLab.Persistence.Test.NewSerializationTest</StartupObject>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <ItemGroup>
+    <ProjectReference Include="..\Persistence\HeuristicLab.Persistence.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="NewSerializationTest.cs" />
+    <Compile Include="SerializationTest.cs" />
+    <Compile Include="StorableAttributeTests.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.XML" />
+  </ItemGroup>
+</Project>
Index: branches/New Persistence Exploration/Persistence/Test/NewSerializationTest.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Test/NewSerializationTest.cs	(revision 1356)
+++ branches/New Persistence Exploration/Persistence/Test/NewSerializationTest.cs	(revision 1357)
@@ -1,7 +1,145 @@
 ﻿using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.IO;
-
-namespace Persistence.Test {
+using HeuristicLab.Persistence.Interfaces;
+
+namespace HeuristicLab.Persistence.Test {
+
+  public class RootBase {
+    [Storable]
+    private string baseString = "Serial";
+  }
+
+  public class Root : RootBase {
+    [Storable]
+    public int[] i = new[] { 3, 4, 5, 6 };
+    [Storable]
+    public string s;
+    [Storable]
+    public ArrayList intArray = new ArrayList(new[] { 1, 2, 3 });
+    [Storable]
+    public List<int> intList = new List<int>(new[] { 321, 312, 321 });
+    [Storable]
+    public Custom c;
+    [Storable]
+    public List<Root> selfReferences;
+    [Storable]
+    public double[,] multiDimArray = new double[,] { { 1, 2, 3 }, { 3, 4, 5 } };
+    [Storable]
+    public bool boolean = true;
+    [Storable]
+    public DateTime dateTime;
+    [Storable]
+    public KeyValuePair<string, int> kvp = new KeyValuePair<string, int>("Serial", 123);
+    [Storable]
+    public Dictionary<string, int> dict = new Dictionary<string, int>();
+    [Storable(DefaultValue = "default")]
+    public string uninitialized;
+  }
+
+  public class Custom {
+    [Storable]
+    public int i;
+    [Storable]
+    public Root r;
+    [Storable]
+    public string name = "Serial";
+  }
+
+  public class CloneableRoot {
+    public int[] i = new[] { 3, 4, 5, 6 };
+    public string s;
+    public ArrayList intArray = new ArrayList(new[] { 1, 2, 3 });
+    public List<int> intList = new List<int>(new[] { 321, 312, 321 });
+    public CloneableCustom c;
+    public List<CloneableRoot> selfReferences;
+    public double[,] multiDimArray = new double[,] { { 1, 2, 3 }, { 3, 4, 5 } };
+    public bool boolean = true;
+    public DateTime dateTime;
+    public KeyValuePair<string, int> kvp = new KeyValuePair<string, int>("test key", 123);
+    public Dictionary<string, int> dict = new Dictionary<string, int>();
+    public object Clone(Dictionary<object, object> twins) {
+      if (twins.ContainsKey(this))
+        return twins[this];
+      CloneableRoot cr = new CloneableRoot();
+      twins.Add(this, cr);
+      cr.i = i;
+      cr.s = s;
+      cr.intArray = new ArrayList(intArray);
+      cr.intList = new List<int>(intList);
+      cr.c = (CloneableCustom)c.Clone(twins);
+      cr.selfReferences = new List<CloneableRoot>();
+      for (int j = 0; j < selfReferences.Count; j++) {
+        cr.selfReferences.Add(this);
+      }
+      cr.multiDimArray = (double[,])multiDimArray.Clone();
+      cr.dateTime = new DateTime(dateTime.Ticks);
+      cr.kvp = new KeyValuePair<string, int>(kvp.Key, kvp.Value);
+      cr.dict = new Dictionary<string, int>(dict);
+      return cr;
+    }
+  }
+
+  public class CloneableCustom {
+    public int i;
+    public CloneableRoot r;
+    public string name = "Serial";
+    public object Clone(Dictionary<object, object> twins) {
+      if (twins.ContainsKey(this))
+        return twins[this];
+      CloneableCustom cc = new CloneableCustom();
+      twins.Add(this, cc);
+      cc.i = i;
+      cc.r = (CloneableRoot)r.Clone(twins);
+      cc.name = name;
+      return cc;
+    }
+  }
+
+  public class Manager {
+
+    private DateTime lastLoadTime;
+    [Storable]
+    private DateTime lastLoadTimePersistence {
+      get { return lastLoadTime; }
+      // ReSharper disable ValueParameterNotUsed
+      set { lastLoadTime = DateTime.Now; }
+      // ReSharper restore ValueParameterNotUsed
+    }
+    [Storable]
+    private double? dbl;
+  }
+
+  public class StorableObject {
+
+    [Storable]
+    Dictionary<int, string> dict;
+
+    public void Init() {
+      dict = new Dictionary<int, string>();
+      for (int i = 0; i < 1000000; i++) {
+        dict.Add(i, i.ToString());
+      }
+    }
+  }
+
+  public class CloneableObject : ICloneable {
+
+    Dictionary<int, string> dict;
+
+    public void Init() {
+      dict = new Dictionary<int, string>();
+      for (int i = 0; i < 1000000; i++) {
+        dict.Add(i, i.ToString());
+      }
+    }
+    public object Clone() {
+      CloneableObject clone = new CloneableObject {
+        dict = new Dictionary<int, string>(dict)
+      };
+      return clone;
+    }
+  }  
 
   public class NewSerializationTest {
Index: branches/New Persistence Exploration/Persistence/Test/SerializationTest.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Test/SerializationTest.cs	(revision 1357)
+++ branches/New Persistence Exploration/Persistence/Test/SerializationTest.cs	(revision 1357)
@@ -0,0 +1,52 @@
+﻿using System;
+using System.Xml.Serialization;
+using System.Collections;
+
+namespace Persistence.Test {
+
+  [Serializable]
+  public class Employer {
+
+    public string name;
+    public ArrayList employees;
+
+    public Employer() { }
+
+    public Employer(string name) {
+      this.name = name;
+      employees = new ArrayList();
+    }
+
+  }
+
+  [Serializable]
+  public class Employee {
+
+    public string firstName;
+    public string lastName;
+    public Employer employer;
+
+    public Employee() { }
+
+    public Employee(string firstName, string lastName, Employer employer) {
+      this.firstName = firstName;
+      this.lastName = lastName;
+      this.employer = employer;
+    }
+
+  }
+   
+  class SerializationTest {
+    public static void Main() {
+
+      Employer company = new Employer("FH OOE F&E GmbH.");
+      company.employees.Add(new Employee("John", "Smith", company));
+      company.employees.Add(new Employee("Max", "Mustermann", company));
+      company.employees.Add(new Employee("Erik", "Pitzer", company));
+
+      XmlSerializer s = new XmlSerializer(typeof(Employer));
+      s.Serialize(Console.Out, company);
+      Console.ReadLine();
+    }
+  }
+}
Index: branches/New Persistence Exploration/Persistence/Test/StorableAttributeTests.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Test/StorableAttributeTests.cs	(revision 1357)
+++ branches/New Persistence Exploration/Persistence/Test/StorableAttributeTests.cs	(revision 1357)
@@ -0,0 +1,40 @@
+﻿using System;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Persistence.Test {
+
+  class TestClass {
+
+    [Storable(Name="TestProperty", DefaultValue=12)]
+    public object o;
+
+    [Storable]
+    public int x = 2;
+
+    public int y;
+
+  }
+
+  class AttributeTest {
+
+    static void Main() {
+      TestClass t = new TestClass();
+      Dictionary<string, DataMemberAccessor> accessors = StorableAttribute.GetAutostorableAccessors(t);
+      foreach ( KeyValuePair<string, DataMemberAccessor> pair in accessors ) {
+        Console.WriteLine(pair.Key + ": " + pair.Value);
+      }
+      t.o = new Object();
+      t.x = 12;
+      t.y = 312890;
+      accessors["o"].Set(null);
+      accessors["x"].Set(123);
+      try {
+        accessors["y"].Set(0);
+        throw new InvalidOperationException();
+      } catch ( KeyNotFoundException ) { }
+      Console.ReadLine();
+    }
+
+  }
+
+}
Index: branches/New Persistence Exploration/Persistence/Test/Test.csproj
===================================================================
--- branches/New Persistence Exploration/Persistence/Test/Test.csproj	(revision 1356)
+++ 	(revision )
@@ -1,57 +1,0 @@
-﻿<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.30729</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{E2245078-6F40-449E-A370-01A97A7C5E6A}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Test</RootNamespace>
-    <AssemblyName>Test</AssemblyName>
-    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <StartupObject>Persistence.Test.NewSerializationTest</StartupObject>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>TRACE;DEBUG</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-  <ItemGroup>
-    <ProjectReference Include="..\Persistence\Persistence.csproj">
-      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
-      <Name>Persistence</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="NewSerializationTest.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Core">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-  </ItemGroup>
-</Project>
