Index: branches/New Persistence Exploration/Persistence/Persistence.sln
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence.sln	(revision 1263)
+++ branches/New Persistence Exploration/Persistence/Persistence.sln	(revision 1264)
@@ -3,6 +3,4 @@
 # Visual Studio 2008
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Persistence", "Persistence\Persistence.csproj", "{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Core", "..\..\..\hl3\core\trunk\sources\HeuristicLab.Core\HeuristicLab.Core.csproj", "{F43B59AB-2B8C-4570-BC1E-15592086517C}"
 EndProject
 Global
@@ -20,12 +18,4 @@
 		{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}.Release|Any CPU.Build.0 = Release|Any CPU
 		{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}.Release|x86.ActiveCfg = Release|Any CPU
-		{F43B59AB-2B8C-4570-BC1E-15592086517C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{F43B59AB-2B8C-4570-BC1E-15592086517C}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{F43B59AB-2B8C-4570-BC1E-15592086517C}.Debug|x86.ActiveCfg = Debug|x86
-		{F43B59AB-2B8C-4570-BC1E-15592086517C}.Debug|x86.Build.0 = Debug|x86
-		{F43B59AB-2B8C-4570-BC1E-15592086517C}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{F43B59AB-2B8C-4570-BC1E-15592086517C}.Release|Any CPU.Build.0 = Release|Any CPU
-		{F43B59AB-2B8C-4570-BC1E-15592086517C}.Release|x86.ActiveCfg = Release|x86
-		{F43B59AB-2B8C-4570-BC1E-15592086517C}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: branches/New Persistence Exploration/Persistence/Persistence/AutoStorableAttribute.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/AutoStorableAttribute.cs	(revision 1263)
+++ 	(revision )
@@ -1,131 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Reflection;
-
-namespace Persistence {
-
-  [AttributeUsage(
-    AttributeTargets.Field | AttributeTargets.Property,
-    AllowMultiple=false,
-    Inherited=false)]
-  public class AutoStorableAttribute : Attribute {
-
-    private string name = null;
-    private object defaultValue = null;
-
-    public string Name {
-      get { return this.name; }
-      set { this.name = value; }
-    }
-
-    public object DefaultValue {
-      get { return this.defaultValue; }
-      set { this.defaultValue = value; }
-    }  
-
-    private const BindingFlags instanceMembers =
-      BindingFlags.Instance |
-      BindingFlags.Public |
-      BindingFlags.NonPublic;
-
-    public static Dictionary<string, DataMemberAccessor> GetAutostorableAccessors(object obj) {
-      Dictionary<string, DataMemberAccessor> autoStorableAccessors = 
-        new Dictionary<string, DataMemberAccessor>();
-      foreach (MemberInfo memberInfo in obj.GetType().GetMembers(instanceMembers)) {
-        foreach (object attribute in memberInfo.GetCustomAttributes(false)) {          
-          AutoStorableAttribute autoStorableAttribute =
-            attribute as AutoStorableAttribute;
-          if (autoStorableAttribute != null) {
-            autoStorableAccessors.Add(memberInfo.Name,
-              new DataMemberAccessor(memberInfo, autoStorableAttribute, obj));
-          }
-        }
-      }
-      return autoStorableAccessors;
-    }    
-  }
-
-  public interface IDataMemberAccessor {
-    string Name { get; }
-    Type Type { get; }
-    object DefaultValue { get; }
-    object Get();
-    void Set(object value);    
-  }
-    
-  public class DataMemberAccessor : IDataMemberAccessor {
-
-    public delegate object Getter();
-    public delegate void Setter(object value);
-
-    private string name;
-    private Type type;
-    private object defaultValue;
-    private Getter getter;
-    private Setter setter;
-
-    public DataMemberAccessor(
-        MemberInfo memberInfo,
-        AutoStorableAttribute autoStorableAttribute,
-        object obj) {
-      if (memberInfo.MemberType == MemberTypes.Field) {
-        this.getter = () => ((FieldInfo)memberInfo).GetValue(obj);
-        this.setter = (value) => ((FieldInfo)memberInfo).SetValue(obj, value);
-      } else if (memberInfo.MemberType == MemberTypes.Property) {
-        this.getter = () => ((PropertyInfo)memberInfo).GetValue(obj, null);
-        this.setter = (value) => ((PropertyInfo)memberInfo).SetValue(obj, value, null);
-      } else {
-        throw new NotSupportedException(
-                "The AutoStorable attribute can only be applied to fields and properties.\n" +
-                "However, it was applied to a member of type " + memberInfo.MemberType.ToString());
-      }      
-      this.name = autoStorableAttribute.Name != null ? autoStorableAttribute.Name : memberInfo.Name;
-      this.type = memberInfo.ReflectedType;
-      this.defaultValue = autoStorableAttribute.DefaultValue;                  
-    }
-
-    public DataMemberAccessor(
-        string name, Type type, object defaultValue,
-        Getter getter, Setter setter) {
-      this.name = name;
-      this.type = type;
-      this.defaultValue = defaultValue;
-      this.getter = getter;
-      this.setter = setter;
-    }
-
-    public string Name {
-      get { return this.name; }
-    }
-
-    public Type Type {
-      get { return this.type; }
-    }
-
-    public object DefaultValue {
-      get { return this.defaultValue; }
-    }
-
-    public object Get() {
-      return this.getter();
-    }
-
-    public void Set(object value) {
-      this.setter(value);
-    }
-
-    public override string ToString() {
-      return String.Format("Property({0}, {1}, {2}, {3}, {4}",
-        this.name,
-        this.type == null ? "<null>" : this.type.FullName,
-        this.defaultValue == null ? "<null>" : this.defaultValue,
-        this.getter.Method,
-        this.setter.Method);
-    }
-  }
-
-
-  
-
-}
Index: branches/New Persistence Exploration/Persistence/Persistence/AutoStorableAttributeTests.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/AutoStorableAttributeTests.cs	(revision 1263)
+++ 	(revision )
@@ -1,41 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Persistence {
-
-  class TestClass {
-
-    [AutoStorable(Name="TestProperty", DefaultValue=12)]
-    public object o;
-
-    [AutoStorable]
-    public int x = 2;
-
-    public int y;
-
-  }
-
-  class AttributeTest {
-
-    static void Main() {
-      TestClass t = new TestClass();
-      Dictionary<string, DataMemberAccessor> accessors = AutoStorableAttribute.GetAutostorableAccessors(t);
-      foreach ( KeyValuePair<string, DataMemberAccessor> pair in accessors ) {
-        Console.WriteLine(pair.Key + ": " + pair.Value.ToString());
-      }
-      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/Persistence/NewSerializationTest.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/NewSerializationTest.cs	(revision 1264)
+++ branches/New Persistence Exploration/Persistence/Persistence/NewSerializationTest.cs	(revision 1264)
@@ -0,0 +1,46 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Collections;
+
+namespace Persistence {
+
+  public class Root {
+
+    [Storable]
+    public int[] i = new int[] { 3, 4, 5, 6 };
+    [Storable]
+    public string s;
+    [Storable]
+    public ArrayList intArray = new ArrayList(new int[] { 1, 2, 3 });
+    [Storable]
+    public Custom c; 
+
+  }
+
+  public class Custom {
+    [Storable]
+    public int i;
+    [Storable]
+    public Root r;
+    [Storable]
+    public string name = "Serial";
+  }
+
+  public class NewSerializationTest {
+    public static void Main() {
+      Root r = new Root();
+      r.c = new Custom();
+      r.c.r = r;
+      IPrimitiveSerializer[] serializers = {
+          new String2XMLSerializer(),
+          new Int2XMLSerializer()};
+      Serializer s = new Serializer(r, serializers);
+      Persistence.XmlFormatter xmlFormatter = new Persistence.XmlFormatter();
+      foreach (ISerializationToken token in s) {
+        Console.Write(xmlFormatter.Format(token));
+      }
+      Console.In.ReadLine();
+    }
+  }
+}
Index: branches/New Persistence Exploration/Persistence/Persistence/Persistence.csproj
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/Persistence.csproj	(revision 1263)
+++ branches/New Persistence Exploration/Persistence/Persistence/Persistence.csproj	(revision 1264)
@@ -13,5 +13,5 @@
     <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
-    <StartupObject>Persistence.SerializationTest</StartupObject>
+    <StartupObject>Persistence.NewSerializationTest</StartupObject>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -49,6 +49,7 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="AutoStorableAttributeTests.cs" />
-    <Compile Include="AutoStorableAttribute.cs" />
+    <Compile Include="StorableAttributeTests.cs" />
+    <Compile Include="StorableAttribute.cs" />
+    <Compile Include="NewSerializationTest.cs" />
     <Compile Include="PersistenceManager.cs" />
     <Compile Include="SerializationTest.cs" />
Index: branches/New Persistence Exploration/Persistence/Persistence/PersistenceManager.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/PersistenceManager.cs	(revision 1264)
+++ branches/New Persistence Exploration/Persistence/Persistence/PersistenceManager.cs	(revision 1264)
@@ -0,0 +1,274 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using System.Collections;
+using System.Reflection;
+
+namespace Persistence {
+
+  #region Tokens
+  public interface ISerializationToken {
+  }
+  public class BeginToken : ISerializationToken {
+    public DataMemberAccessor Accessor;
+    public int Id;
+    public BeginToken(DataMemberAccessor accessor, int id) {
+      this.Accessor = accessor;
+      this.Id = id;
+    }    
+  }
+  public class EndToken : ISerializationToken {
+    public DataMemberAccessor Accessor;
+    public int Id;
+    public EndToken(DataMemberAccessor accessor, int id) {
+      this.Accessor = accessor;
+      this.Id = id;
+    }    
+  }
+  public class PrimitiveToken : ISerializationToken {
+    public DataMemberAccessor accessor;
+    public object Data;
+    public PrimitiveToken(DataMemberAccessor accessor, object data) {
+      this.accessor =  accessor;
+      this.Data = data;
+    }    
+  }
+  public class ReferenceToken : ISerializationToken {
+    public string Name;
+    public int Id;
+    public ReferenceToken(string name, int id) {
+      this.Name = name;
+      this.Id = id;
+    }    
+  }
+  public class NullReferenceToken : ISerializationToken {
+    public string Name;
+    public NullReferenceToken(string name) {
+      this.Name = name;
+    }
+  }
+  #endregion
+
+  #region Primitives
+  public interface IPrimitiveSerializer {
+    Type Type { get; }
+    object Serialize(object o);
+    object DeSerialize(object o);
+  }
+  public class String2XMLSerializer : IPrimitiveSerializer {
+    public Type Type { get { return typeof(string); } }
+    public object Serialize(object o) {
+      return "<![CDATA[" +
+        ((string)o).Replace("]]>", "]]]]><![CDATA[>") +
+        "]]>";
+    }
+    public object DeSerialize(object o) {
+      StringBuilder sb = new StringBuilder();
+      foreach (string s in ((string)o).Split(
+        new string[] { "<![CDATA[", "]]>" },
+        StringSplitOptions.RemoveEmptyEntries)) {
+        sb.Append(s);
+      }
+      return sb.ToString();
+    }
+  }
+  public class Int2XMLSerializer : IPrimitiveSerializer {
+    public Type Type { get { return typeof(int); } }
+    public object Serialize(object o) {
+      return ((int)o).ToString();
+    }
+    public object DeSerialize(object o) {
+      return int.Parse((string)o);
+    }
+  }
+  #endregion
+
+  #region Generics (incomplete)
+  public interface ICustomSerializer {
+    bool CanSerialize(Type type);
+    IEnumerable Serialize(object o);
+    object DeSerialize(IEnumerable o, Type t);
+  }
+  public class EnumerableSerializer : ICustomSerializer {
+    public bool CanSerialize(Type type) {
+      if (type.GetInterface("IEnumerable") == null)
+        return false;
+      if (type.GetMethod("GetEnumerator", new Type[] {}) == null)
+        return false;
+      MethodInfo addMethod = type.GetMethod("Add");
+      if (addMethod == null)
+        return false;
+      if (addMethod.GetParameters().Length != 1)
+        return false;
+      return true;
+    }
+    public IEnumerable Serialize(object o) {
+      return (IEnumerable)o;
+    }
+    public object DeSerialize(IEnumerable objects, Type t) {
+      object instance = Activator.CreateInstance(t);
+      foreach (object o in objects) {
+        t.GetMethod("Add").Invoke(instance, new object[] { o });
+      }
+      return instance;
+    }
+  }
+  public class ArraySerializer : ICustomSerializer {    
+
+    public bool CanSerialize(Type type) {
+      return type.IsArray;      
+    }
+
+    public IEnumerable Serialize(object array) {
+      foreach (object o in (Array)array) {
+        yield return o;
+      }
+    }
+
+    public object DeSerialize(IEnumerable o, Type t) {
+      throw new NotImplementedException();
+    }
+
+  }
+  #endregion
+
+  public class Serializer : IEnumerable<ISerializationToken> {
+
+    private object obj;
+    private string rootName;
+    private Dictionary<object, int> obj2id;
+    private Dictionary<Type, IPrimitiveSerializer> primitiveSerializers;
+    private List<ICustomSerializer> customSerializers;
+
+    public Serializer(object obj, IEnumerable<IPrimitiveSerializer> primitiveSerializers) :
+      this(obj, primitiveSerializers, "ROOT") { }
+
+    public Serializer(object obj, IEnumerable<IPrimitiveSerializer> primitiveSerializers, string rootName) {
+      this.obj = obj;
+      this.rootName = rootName;
+      this.primitiveSerializers = new Dictionary<Type,IPrimitiveSerializer>();
+      foreach (IPrimitiveSerializer serializer in primitiveSerializers) {
+        this.primitiveSerializers.Add(serializer.Type, serializer);
+      }
+      this.customSerializers = new List<ICustomSerializer>();
+      customSerializers.Add(new EnumerableSerializer());
+      customSerializers.Add(new ArraySerializer());
+      this.obj2id = new Dictionary<object, int>();
+      obj2id.Add(new object(), 0);      
+    }    
+
+    IEnumerator IEnumerable.GetEnumerator() {
+      return this.GetEnumerator();
+    }
+
+    public IEnumerator<ISerializationToken> GetEnumerator() {
+      DataMemberAccessor rootAccessor = new DataMemberAccessor(
+        this.rootName, obj.GetType(), null, () => this.obj, null);
+      IEnumerator<ISerializationToken> iterator = Serialize(rootAccessor);
+      while (iterator.MoveNext())
+        yield return iterator.Current;      
+    }
+
+    private IEnumerator<ISerializationToken> Serialize(DataMemberAccessor accessor) {
+      object value = accessor.Get();
+      if (value == null) {
+        yield return new NullReferenceToken(accessor.Name);
+      } else if (this.primitiveSerializers.ContainsKey(accessor.Type)) {
+        yield return new PrimitiveToken(accessor, this.primitiveSerializers[accessor.Type].Serialize(value));
+      } else if (this.obj2id.ContainsKey(value)) {
+        yield return new ReferenceToken(accessor.Name, this.obj2id[value]);
+      } else {
+        int id = obj2id.Count;
+        this.obj2id.Add(value, id);
+        yield return new BeginToken(accessor, id);
+        ICustomSerializer customSerializer = this.FindCustomSerializer(accessor.Type);
+        if (customSerializer != null) {
+          foreach (object obj in customSerializer.Serialize(value)) {
+            IEnumerator<ISerializationToken> iterator = this.Serialize(new DataMemberAccessor(obj));
+            while (iterator.MoveNext())
+              yield return iterator.Current;            
+          }
+        } else { // composite serialization
+          foreach (KeyValuePair<string, DataMemberAccessor> mapping in
+            StorableAttribute.GetAutostorableAccessors(value)) {
+            IEnumerator<ISerializationToken> iterator = this.Serialize(mapping.Value);
+            while (iterator.MoveNext())
+              yield return iterator.Current;
+          }
+        }
+        yield return new EndToken(accessor, id);        
+      }
+    }
+
+    private ICustomSerializer FindCustomSerializer(Type type) {
+      foreach (ICustomSerializer s in customSerializers) {
+        if (s.CanSerialize(type))
+          return s;
+      }
+      return null;
+    }                
+  }
+
+  public class XmlFormatter {
+
+    delegate string Formatter(ISerializationToken token);
+
+    private Dictionary<Type, Formatter> formatters;
+    private int depth;
+
+    public XmlFormatter() {
+      this.formatters = new Dictionary<Type,Formatter>();
+      this.formatters.Add(typeof(BeginToken), new Formatter(FormatBegin));
+      this.formatters.Add(typeof(EndToken), new Formatter(FormatEnd));
+      this.formatters.Add(typeof(PrimitiveToken), new Formatter(FormatData));
+      this.formatters.Add(typeof(ReferenceToken), new Formatter(FormatReference));
+      this.formatters.Add(typeof(NullReferenceToken), new Formatter(FormatNullReference));
+      this.depth = 0;
+    }
+    
+    public string Format(ISerializationToken token) {
+      return formatters[token.GetType()](token);
+    }
+
+    private string Prefix {
+      get { return new string(' ', this.depth*2); }
+    }
+
+    private string FormatBegin(ISerializationToken token) {
+      BeginToken beginToken = (BeginToken)token;
+      string result =
+        String.Format("{0}<COMPOSITE name=\"{1}\" type=\"{2}\" id=\"{3}\">\n",
+          this.Prefix, beginToken.Accessor.Name, beginToken.Accessor.Type, beginToken.Id);
+      this.depth += 1;
+      return result;
+    }
+
+    private string FormatEnd(ISerializationToken token) {
+      EndToken endToken = (EndToken)token;
+      this.depth -= 1;
+      return Prefix + "</COMPOSITE>\n";
+    }
+
+    private string FormatData(ISerializationToken token) {
+      PrimitiveToken dataToken = (PrimitiveToken)token;
+      return String.Format("{0}<PRIMITIVE name=\"{1}\" type=\"{2}\">{3}</PRIMITIVE>\n",
+        this.Prefix, dataToken.accessor.Name, dataToken.accessor.Type, dataToken.Data);      
+    }
+
+    private string FormatReference(ISerializationToken token) {
+      ReferenceToken refToken = (ReferenceToken)token;
+      return String.Format("{0}<REFERENCE name=\"{1}\" ref=\"{2}\"/>\n",
+        this.Prefix, refToken.Name, refToken.Id);      
+    }
+
+    private string FormatNullReference(ISerializationToken token) {
+      NullReferenceToken nullRefToken = (NullReferenceToken)token;
+      return String.Format("{0}<NULL name=\"{1}\"/>\n",
+        this.Prefix, nullRefToken.Name);
+    }
+
+
+  }
+  
+}
Index: branches/New Persistence Exploration/Persistence/Persistence/StorableAttribute.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/StorableAttribute.cs	(revision 1264)
+++ branches/New Persistence Exploration/Persistence/Persistence/StorableAttribute.cs	(revision 1264)
@@ -0,0 +1,145 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Reflection;
+
+namespace Persistence {
+
+  [AttributeUsage(
+    AttributeTargets.Field | AttributeTargets.Property,
+    AllowMultiple=false,
+    Inherited=false)]
+  public class StorableAttribute : Attribute {
+
+    private string name = null;
+    private object defaultValue = null;
+
+    public string Name {
+      get { return this.name; }
+      set { this.name = value; }
+    }
+
+    public object DefaultValue {
+      get { return this.defaultValue; }
+      set { this.defaultValue = value; }
+    }  
+
+    private const BindingFlags instanceMembers =
+      BindingFlags.Instance |
+      BindingFlags.Public |
+      BindingFlags.NonPublic;
+
+    public static Dictionary<string, DataMemberAccessor> GetAutostorableAccessors(object obj) {
+      Dictionary<string, DataMemberAccessor> autoStorableAccessors = 
+        new Dictionary<string, DataMemberAccessor>();
+      foreach (MemberInfo memberInfo in obj.GetType().GetMembers(instanceMembers)) {
+        foreach (object attribute in memberInfo.GetCustomAttributes(false)) {          
+          StorableAttribute autoStorableAttribute =
+            attribute as StorableAttribute;
+          if (autoStorableAttribute != null) {
+            autoStorableAccessors.Add(memberInfo.Name,
+              new DataMemberAccessor(memberInfo, autoStorableAttribute, obj));
+          }
+        }
+      }
+      return autoStorableAccessors;
+    }    
+  }
+
+  public interface IDataMemberAccessor {
+    string Name { get; }
+    Type Type { get; }
+    object DefaultValue { get; }
+    object Get();
+    void Set(object value);    
+  }
+    
+  public class DataMemberAccessor : IDataMemberAccessor {
+
+    public delegate object Getter();
+    public delegate void Setter(object value);
+
+    private string name;
+    private Type type;
+    private object defaultValue;
+    private Getter getter;
+    private Setter setter;
+
+    public DataMemberAccessor(
+        MemberInfo memberInfo,
+        StorableAttribute autoStorableAttribute,
+        object obj) {
+      if (memberInfo.MemberType == MemberTypes.Field) {
+        FieldInfo fieldInfo = (FieldInfo)memberInfo;
+        this.getter = () => fieldInfo.GetValue(obj);
+        this.setter = (value) => fieldInfo.SetValue(obj, value);
+        this.type = fieldInfo.FieldType;
+      } else if (memberInfo.MemberType == MemberTypes.Property) {
+        PropertyInfo propertyInfo = (PropertyInfo)memberInfo;
+        if (!propertyInfo.CanRead || !propertyInfo.CanWrite) {
+          throw new NotSupportedException(
+            "Storable properties must implement both a Get and a Set accessor. ");
+        }
+        this.getter = () => propertyInfo.GetValue(obj, null);
+        this.setter = (value) => propertyInfo.SetValue(obj, value, null);
+        this.type = propertyInfo.PropertyType;
+      } else {
+        throw new NotSupportedException(
+                "The Storable attribute can only be applied to fields and properties.");
+      }      
+      this.name = autoStorableAttribute.Name != null ? autoStorableAttribute.Name : memberInfo.Name;      
+      this.defaultValue = autoStorableAttribute.DefaultValue;                  
+    }
+
+    public DataMemberAccessor(
+        string name, Type type, object defaultValue,
+        Getter getter, Setter setter) {
+      this.name = name;
+      this.type = type;
+      this.defaultValue = defaultValue;
+      this.getter = getter;
+      this.setter = setter;
+    }
+
+    public DataMemberAccessor(object o) {
+      this.name = "";
+      this.type = o.GetType();
+      this.defaultValue = null;
+      this.getter = () => o;
+      this.setter = null;
+    }
+
+    public string Name {
+      get { return this.name; }
+    }
+
+    public Type Type {
+      get { return this.type; }
+    }
+
+    public object DefaultValue {
+      get { return this.defaultValue; }
+    }
+
+    public object Get() {
+      return this.getter();
+    }
+
+    public void Set(object value) {
+      this.setter(value);
+    }
+
+    public override string ToString() {
+      return String.Format("DataMember({0}, {1}, {2}, {3}, {4}",
+        this.name,
+        this.type == null ? "<null>" : this.type.FullName,
+        this.defaultValue == null ? "<null>" : this.defaultValue,
+        this.getter.Method,
+        this.setter.Method);
+    }
+  }
+
+
+  
+
+}
Index: branches/New Persistence Exploration/Persistence/Persistence/StorableAttributeTests.cs
===================================================================
--- branches/New Persistence Exploration/Persistence/Persistence/StorableAttributeTests.cs	(revision 1264)
+++ branches/New Persistence Exploration/Persistence/Persistence/StorableAttributeTests.cs	(revision 1264)
@@ -0,0 +1,41 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Persistence {
+
+  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.ToString());
+      }
+      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();
+    }
+
+  }
+
+}
