Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassAttribute.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassAttribute.cs	(revision 3028)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassAttribute.cs	(revision 3029)
@@ -4,40 +4,5 @@
 using System.Linq;
 
-namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
-
-
-  /// <summary>
-  /// Specifies which memebrs are selected for serialization by the StorableSerializer
-  /// </summary>
-  public enum StorableClassType {
-
-    /// <summary>
-    /// Serialize only fields and properties that have been marked
-    /// with the [Storable] attribute. This is the default value.
-    /// </summary>
-    MarkedOnly,
-
-    /// <summary>
-    /// Serialize all fields but ignore the 
-    /// [Storable] attribute on properties.
-    /// </summary>
-    [Obsolete("not implemented yet")]
-    AllFields,
-
-    /// <summary>
-    /// Serialize all properties but ignore the
-    /// [Storable] attirbute on fields.
-    /// </summary>
-    [Obsolete("not implemented yet")]
-    AllProperties,
-
-    /// <summary>
-    /// Serialize all fields and all properties
-    /// but ignore the [Storable] on all members.
-    /// </summary>
-    [Obsolete("not implemnted yet")]
-    AllFieldsAndAllProperties
-  };
-
+namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {  
 
   /// <summary>
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassType.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassType.cs	(revision 3029)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassType.cs	(revision 3029)
@@ -0,0 +1,45 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Linq;
+
+namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
+
+  /// <summary>
+  /// Specifies which memebrs are selected for serialization by the StorableSerializer
+  /// </summary>
+  public enum StorableClassType {
+
+    /// <summary>
+    /// Serialize only fields and properties that have been marked
+    /// with the [Storable] attribute. This is the default value.
+    /// </summary>
+    MarkedOnly,
+
+    /// <summary>
+    /// Serialize all fields but ignore the 
+    /// [Storable] attribute on properties.
+    /// 
+    /// This does not include generated backing fields
+    /// for automatic properties.
+    /// </summary>    
+    AllFields,
+
+    /// <summary>
+    /// Serialize all properties but ignore the
+    /// [Storable] attribute on fields.
+    /// </summary>    
+    AllProperties,
+
+    /// <summary>
+    /// Serialize all fields and all properties
+    /// regardless of the [Storable] attribute.
+    /// 
+    /// This does not include generated backing fields
+    /// for automatic properties, but uses the property
+    /// accessors instead.
+    /// </summary>    
+    AllFieldsAndAllProperties
+  };  
+}
+
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableMemberInfo.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableMemberInfo.cs	(revision 3029)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableMemberInfo.cs	(revision 3029)
@@ -0,0 +1,41 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Persistence.Interfaces;
+using HeuristicLab.Persistence.Core;
+using System.Reflection;
+using HeuristicLab.Persistence.Auxiliary;
+using System.Text;
+
+namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
+
+  internal sealed class StorableMemberInfo {
+    public MemberInfo MemberInfo { get; private set; }
+    public string DisentangledName { get; private set; }
+    public object DefaultValue { get; private set; }
+    public string FullyQualifiedMemberName {
+      get {
+        return new StringBuilder()
+          .Append(MemberInfo.ReflectedType.FullName)
+          .Append('.')
+          .Append(MemberInfo.Name)
+          .ToString();
+      }
+    }
+    public StorableMemberInfo(StorableAttribute attribute, MemberInfo memberInfo) {
+      DisentangledName = attribute.Name;
+      DefaultValue = attribute.DefaultValue;
+      MemberInfo = memberInfo;
+    }
+    public StorableMemberInfo(MemberInfo memberInfo) {
+      MemberInfo = memberInfo;
+    }
+    public void SetDisentangledName(string name) {
+      if (DisentangledName == null)
+        DisentangledName = name;
+    }
+    public Type GetPropertyDeclaringBaseType() {
+      return ((PropertyInfo)MemberInfo).GetGetMethod(true).GetBaseDefinition().DeclaringType;
+    }
+  }  
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs	(revision 3029)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs	(revision 3029)
@@ -0,0 +1,139 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Persistence.Interfaces;
+using HeuristicLab.Persistence.Core;
+using System.Reflection;
+using HeuristicLab.Persistence.Auxiliary;
+using System.Text;
+
+namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
+
+  internal static class StorableReflection {
+
+    private const BindingFlags DECLARED_INSTANCE_MEMBERS =
+      BindingFlags.Instance |
+      BindingFlags.Public |
+      BindingFlags.NonPublic |
+      BindingFlags.DeclaredOnly;
+
+
+    public static IEnumerable<StorableMemberInfo> GenerateStorableMembers(Type type, bool inherited) {
+      var storableMembers = new List<StorableMemberInfo>();
+      if (inherited && type.BaseType != null)
+        storableMembers.AddRange(GenerateStorableMembers(type.BaseType, true));
+
+      var storableClassAttribute = GetStorableClassAttribute(type);
+      if (storableClassAttribute != null) {
+        switch (storableClassAttribute.Type) {
+          case StorableClassType.MarkedOnly:
+            AddMarkedMembers(type, storableMembers); break;
+          case StorableClassType.AllFields:
+            AddAll(type, MemberTypes.Field, storableMembers); break;
+          case StorableClassType.AllProperties:
+            AddAll(type, MemberTypes.Property, storableMembers); break;
+          case StorableClassType.AllFieldsAndAllProperties:
+            AddAll(type, MemberTypes.Field | MemberTypes.Property, storableMembers); break;
+          default:
+            throw new PersistenceException("unsupported [StorableClassType]: " + storableClassAttribute.Type);
+        }
+      }
+
+      return DisentangleNameMapping(storableMembers);
+    }
+
+    private static void AddMarkedMembers(Type type, List<StorableMemberInfo> storableMembers) {
+      foreach (MemberInfo memberInfo in type.GetMembers(DECLARED_INSTANCE_MEMBERS)) {
+        foreach (StorableAttribute attribute in memberInfo.GetCustomAttributes(typeof(StorableAttribute), false)) {
+          storableMembers.Add(new StorableMemberInfo(attribute, memberInfo));
+        }
+      }
+    }
+
+    private static void AddAll(Type type, MemberTypes memberTypes, List<StorableMemberInfo> storableMembers) {
+      foreach (MemberInfo memberInfo in type.GetMembers(DECLARED_INSTANCE_MEMBERS)) {
+        if ((memberInfo.MemberType & memberTypes) == memberInfo.MemberType &&
+            !memberInfo.Name.StartsWith("<") && 
+            !memberInfo.Name.EndsWith("k__BackingField"))
+          storableMembers.Add(new StorableMemberInfo(memberInfo));
+      }
+    }
+
+    private static StorableClassAttribute GetStorableClassAttribute(Type type) {
+      return (StorableClassAttribute)type
+        .GetCustomAttributes(typeof(StorableClassAttribute), false)
+        .SingleOrDefault();
+    }
+
+    private static IEnumerable<StorableMemberInfo> DisentangleNameMapping(
+        IEnumerable<StorableMemberInfo> storableMemberInfos) {
+      var nameGrouping = new Dictionary<string, List<StorableMemberInfo>>();
+      foreach (StorableMemberInfo storable in storableMemberInfos) {
+        if (!nameGrouping.ContainsKey(storable.MemberInfo.Name))
+          nameGrouping[storable.MemberInfo.Name] = new List<StorableMemberInfo>();
+        nameGrouping[storable.MemberInfo.Name].Add(storable);
+      }
+      var memberInfos = new List<StorableMemberInfo>();
+      foreach (var storableMemberInfoGroup in nameGrouping.Values) {
+        if (storableMemberInfoGroup.Count == 1) {
+          storableMemberInfoGroup[0].SetDisentangledName(storableMemberInfoGroup[0].MemberInfo.Name);
+          memberInfos.Add(storableMemberInfoGroup[0]);
+        } else if (storableMemberInfoGroup[0].MemberInfo.MemberType == MemberTypes.Field) {
+          foreach (var storableMemberInfo in storableMemberInfoGroup) {
+            storableMemberInfo.SetDisentangledName(storableMemberInfo.FullyQualifiedMemberName);
+            memberInfos.Add(storableMemberInfo);
+          }
+        } else {
+          memberInfos.AddRange(MergePropertyAccessors(storableMemberInfoGroup));
+        }
+      }
+      return memberInfos;
+    }
+
+    private static IEnumerable<StorableMemberInfo> MergePropertyAccessors(List<StorableMemberInfo> members) {
+      var uniqueAccessors = new Dictionary<Type, StorableMemberInfo>();
+      foreach (var member in members)
+        uniqueAccessors[member.GetPropertyDeclaringBaseType()] = member;
+      if (uniqueAccessors.Count == 1) {
+        var storableMemberInfo = uniqueAccessors.Values.First();
+        storableMemberInfo.SetDisentangledName(storableMemberInfo.MemberInfo.Name);
+        yield return storableMemberInfo;
+      } else {
+        foreach (var attribute in uniqueAccessors.Values) {
+          attribute.SetDisentangledName(attribute.FullyQualifiedMemberName);
+          yield return attribute;
+        }
+      }
+    }
+
+    public static bool IsEmptyOrStorableType(Type type, bool recusrive) {
+      if (IsEmptyType(type, recusrive)) return true;
+      if (!HastStorableClassAttribute(type)) return false;
+      return !recusrive || type.BaseType == null || IsEmptyOrStorableType(type.BaseType, true);
+    }
+
+    private static bool HastStorableClassAttribute(Type type) {
+      return type.GetCustomAttributes(typeof(StorableClassAttribute), false).Length > 0;
+    }
+
+    private static bool IsEmptyType(Type type, bool recursive) {
+      foreach (MemberInfo memberInfo in type.GetMembers(DECLARED_INSTANCE_MEMBERS)) {
+        if (IsModifiableMember(memberInfo)) return false;
+      }
+      return !recursive || type.BaseType == null || IsEmptyType(type.BaseType, true);
+    }
+
+    private static bool IsModifiableMember(MemberInfo memberInfo) {
+      return memberInfo.MemberType == MemberTypes.Field && IsModifiableField((FieldInfo)memberInfo) ||
+                memberInfo.MemberType == MemberTypes.Property && IsModifiableProperty((PropertyInfo)memberInfo);
+    }
+
+    private static bool IsModifiableField(FieldInfo fi) {
+      return !fi.IsLiteral && !fi.IsInitOnly;
+    }
+
+    private static bool IsModifiableProperty(PropertyInfo pi) {
+      return pi.CanWrite;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs	(revision 3028)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs	(revision 3029)
@@ -12,11 +12,11 @@
   /// <summary>
   /// Intended for serialization of all custom classes. Classes should have the
-  /// <c>[StorableClass]</c> attribute set and a serialization mode set.
-  /// Optionally selected fields and properties can be marked with the
-  /// <c>[Storable]</c> attribute.
+  /// <c>[StorableClass]</c> attribute set. The default mode is to serialize
+  /// members with the <c>[Storable]</c> attribute set. Alternatively the
+  /// storable mode can be set to <c>AllFields</c>, <c>AllProperties</c>
+  /// or <c>AllFieldsAndAllProperties</c>.
   /// </summary>
-  [StorableClass]    
+  [StorableClass]
   public class StorableSerializer : ICompositeSerializer {
-
 
     #region ICompositeSerializer implementation
@@ -30,5 +30,5 @@
         GetStorableConstructor(type) == null)
         return false;
-      return IsEmptyOrStorableType(type, true);
+      return StorableReflection.IsEmptyOrStorableType(type, true);
     }
 
@@ -37,5 +37,5 @@
         GetStorableConstructor(type) == null)
         return "no default constructor and no storable constructor";
-      if (!IsEmptyOrStorableType(type, true))
+      if (!StorableReflection.IsEmptyOrStorableType(type, true))
         return "class is not marked with the storable class attribute";
       return "no reason";
@@ -71,5 +71,5 @@
       while (iter.MoveNext()) {
         memberDict.Add(iter.Current.Name, iter.Current);
-      }      
+      }
       foreach (var accessor in GetStorableAccessors(instance)) {
         if (memberDict.ContainsKey(accessor.Name)) {
@@ -84,44 +84,8 @@
     #endregion
 
-    #region constances & private data types
+    #region constants & private data types
 
     private const BindingFlags ALL_CONSTRUCTORS =
       BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
-
-    private const BindingFlags DECLARED_INSTANCE_MEMBERS =
-      BindingFlags.Instance |
-      BindingFlags.Public |
-      BindingFlags.NonPublic |
-      BindingFlags.DeclaredOnly;
-
-    private sealed class StorableMemberInfo {
-      public StorableAttribute Attribute { get; private set; }
-      public MemberInfo MemberInfo { get; private set; }
-      public string DisentangledName { get; private set; }
-      public string FullyQualifiedMemberName {
-        get {
-          return new StringBuilder()
-            .Append(MemberInfo.ReflectedType.FullName)
-            .Append('.')
-            .Append(MemberInfo.Name)
-            .ToString();
-        }
-      }
-      public StorableMemberInfo(StorableAttribute attribute, MemberInfo memberInfo) {
-        this.Attribute = attribute;
-        this.MemberInfo = memberInfo;
-      }
-      public override string ToString() {
-        return new StringBuilder()
-          .Append('[').Append(Attribute).Append(", ")
-          .Append(MemberInfo).Append('}').ToString();
-      }
-      public void SetDisentangledName(string name) {
-        DisentangledName = Attribute.Name ?? name;
-      }
-      public Type GetPropertyDeclaringBaseType() {
-        return ((PropertyInfo)MemberInfo).GetGetMethod(true).GetBaseDefinition().DeclaringType;
-      }
-    }
 
     private sealed class TypeQuery {
@@ -141,10 +105,10 @@
 
     private MemberCache storableMemberCache = new MemberCache();
-    private Dictionary<Type, ConstructorInfo> constructorCache = 
+    private Dictionary<Type, ConstructorInfo> constructorCache =
       new Dictionary<Type, ConstructorInfo>();
 
     #endregion
 
-    #region auxiliary attribute reflection tools
+    #region attribute access
 
     private IEnumerable<StorableMemberInfo> GetStorableMembers(Type type) {
@@ -157,101 +121,9 @@
         if (storableMemberCache.ContainsKey(query))
           return storableMemberCache[query];
-        var storablesMembers = GenerateStorableMembers(type, inherited);
+        var storablesMembers = StorableReflection.GenerateStorableMembers(type, inherited);
         storableMemberCache[query] = storablesMembers;
         return storablesMembers;
       }
-    }
-
-    private static IEnumerable<StorableMemberInfo> GenerateStorableMembers(Type type, bool inherited) {
-      var storableMembers = new List<StorableMemberInfo>();
-      if (inherited && type.BaseType != null)
-        storableMembers.AddRange(GenerateStorableMembers(type.BaseType, true));
-      foreach (MemberInfo memberInfo in type.GetMembers(DECLARED_INSTANCE_MEMBERS)) {
-        foreach (StorableAttribute attribute in memberInfo.GetCustomAttributes(typeof(StorableAttribute), false)) {
-          storableMembers.Add(new StorableMemberInfo(attribute, memberInfo));
-        }
-      }
-      return DisentangleNameMapping(storableMembers);
-    }
-
-    private IEnumerable<DataMemberAccessor> GetStorableAccessors(object obj) {
-      foreach (var memberInfo in GetStorableMembers(obj.GetType()))
-        yield return new DataMemberAccessor(
-          memberInfo.MemberInfo,
-          memberInfo.DisentangledName,
-          memberInfo.Attribute.DefaultValue,
-          obj);
-    }
-
-    private static IEnumerable<StorableMemberInfo> DisentangleNameMapping(
-        IEnumerable<StorableMemberInfo> storableMemberInfos) {
-      var nameGrouping = new Dictionary<string, List<StorableMemberInfo>>();
-      foreach (StorableMemberInfo storable in storableMemberInfos) {
-        if (!nameGrouping.ContainsKey(storable.MemberInfo.Name))
-          nameGrouping[storable.MemberInfo.Name] = new List<StorableMemberInfo>();
-        nameGrouping[storable.MemberInfo.Name].Add(storable);
-      }
-      var memberInfos = new List<StorableMemberInfo>();
-      foreach (var storableMemberInfoGroup in nameGrouping.Values) {
-        if (storableMemberInfoGroup.Count == 1) {
-          storableMemberInfoGroup[0].SetDisentangledName(storableMemberInfoGroup[0].MemberInfo.Name);
-          memberInfos.Add(storableMemberInfoGroup[0]);
-        } else if (storableMemberInfoGroup[0].MemberInfo.MemberType == MemberTypes.Field) {
-          foreach (var storableMemberInfo in storableMemberInfoGroup) {
-            storableMemberInfo.SetDisentangledName(storableMemberInfo.FullyQualifiedMemberName);
-            memberInfos.Add(storableMemberInfo);
-          }
-        } else {
-          memberInfos.AddRange(MergePropertyAccessors(storableMemberInfoGroup));
-        }
-      }
-      return memberInfos;
-    }
-
-    private static IEnumerable<StorableMemberInfo> MergePropertyAccessors(List<StorableMemberInfo> members) {
-      var uniqueAccessors = new Dictionary<Type, StorableMemberInfo>();
-      foreach (var member in members)
-        uniqueAccessors[member.GetPropertyDeclaringBaseType()] = member;
-      if (uniqueAccessors.Count == 1) {
-        var storableMemberInfo = uniqueAccessors.Values.First();
-        storableMemberInfo.SetDisentangledName(storableMemberInfo.MemberInfo.Name);
-        yield return storableMemberInfo;
-      } else {
-        foreach (var attribute in uniqueAccessors.Values) {
-          attribute.SetDisentangledName(attribute.FullyQualifiedMemberName);
-          yield return attribute;
-        }
-      }
-    }
-
-    private static bool IsEmptyOrStorableType(Type type, bool recusrive) {
-      if (IsEmptyType(type, recusrive)) return true;
-      if (!HastStorableClassAttribute(type)) return false;
-      return !recusrive || type.BaseType == null || IsEmptyOrStorableType(type.BaseType, true);
-    }
-
-    private static bool HastStorableClassAttribute(Type type) {
-      return type.GetCustomAttributes(typeof(StorableClassAttribute), false).Length > 0;
-    }
-
-    private static bool IsEmptyType(Type type, bool recursive) {
-      foreach (MemberInfo memberInfo in type.GetMembers(DECLARED_INSTANCE_MEMBERS)) {
-        if (IsModifiableMember(memberInfo)) return false;
-      }
-      return !recursive || type.BaseType == null || IsEmptyType(type.BaseType, true);
-    }
-
-    private static bool IsModifiableMember(MemberInfo memberInfo) {
-      return memberInfo.MemberType == MemberTypes.Field && IsModifiableField((FieldInfo)memberInfo) ||
-                memberInfo.MemberType == MemberTypes.Property && IsModifiableProperty((PropertyInfo)memberInfo);
-    }
-
-    private static bool IsModifiableField(FieldInfo fi) {
-      return !fi.IsLiteral && !fi.IsInitOnly;
-    }
-
-    private static bool IsModifiableProperty(PropertyInfo pi) {
-      return pi.CanWrite;
-    }
+    }    
 
     private ConstructorInfo GetStorableConstructor(Type type) {
@@ -273,5 +145,12 @@
     }
 
+    private IEnumerable<DataMemberAccessor> GetStorableAccessors(object obj) {
+      return GetStorableMembers(obj.GetType())
+        .Select(mi => new DataMemberAccessor(mi.MemberInfo, mi.DisentangledName, mi.DefaultValue, obj));
+    }
+
     #endregion
+    
   }
+  
 }
