Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/ConcreteDictionarySerializer.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/ConcreteDictionarySerializer.cs	(revision 5290)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/ConcreteDictionarySerializer.cs	(revision 5290)
@@ -0,0 +1,90 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Persistence.Interfaces;
+
+namespace HeuristicLab.Persistence.Default.CompositeSerializers {
+
+  [StorableClass]
+  internal sealed class ConcreteDictionarySerializer : ICompositeSerializer {
+
+    [StorableConstructor]
+    private ConcreteDictionarySerializer(bool deserializing) { }
+    public ConcreteDictionarySerializer() { }
+
+    public int Priority {
+      get { return 100; }
+    }
+
+
+    public bool CanSerialize(Type type) {
+      return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>);
+    }
+
+    public string JustifyRejection(Type type) {
+      return "Type is not a generic Dictionary<>";
+    }
+
+    public IEnumerable<Tag> CreateMetaInfo(object o) {
+      yield return new Tag("Comparer", o.GetType().GetProperty("Comparer").GetValue(o, null));
+    }
+
+    public IEnumerable<Tag> Decompose(object o) {
+      IDictionary dict = (IDictionary)o;
+      foreach (DictionaryEntry entry in dict) {
+        yield return new Tag("key", entry.Key);
+        yield return new Tag("value", entry.Value);
+      }
+    }
+
+    public object CreateInstance(Type t, IEnumerable<Tag> metaInfo) {
+      return Activator.CreateInstance(t, metaInfo.First().Value);
+    }
+
+    public void Populate(object instance, IEnumerable<Tag> o, Type t) {
+      IDictionary dict = (IDictionary)instance;
+      IEnumerator<Tag> iter = o.GetEnumerator();
+      try {
+        while (iter.MoveNext()) {
+          Tag key = iter.Current;
+          iter.MoveNext();
+          Tag value = iter.Current;
+          dict.Add(key.Value, value.Value);
+        }
+      } catch (InvalidOperationException e) {
+        throw new PersistenceException("Dictionaries must contain an even number of elements (key+value).", e);
+      } catch (NotSupportedException e) {
+        throw new PersistenceException("The serialized dictionary type was read-only or had a fixed size and cannot be deserialized.", e);
+      } catch (ArgumentNullException e) {
+        throw new PersistenceException("Dictionary key was null.", e);
+      } catch (ArgumentException e) {
+        throw new PersistenceException("Duplicate dictionary key.", e);
+      }
+    }
+  }
+
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/HashSetSerializer.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/HashSetSerializer.cs	(revision 5290)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/HashSetSerializer.cs	(revision 5290)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Persistence.Interfaces;
+
+namespace HeuristicLab.Persistence.Default.CompositeSerializers {
+
+  [StorableClass]
+  internal sealed class HashSetSerializer : ICompositeSerializer {
+
+    [StorableConstructor]
+    private HashSetSerializer(bool deserializing) { }
+    public HashSetSerializer() { }
+
+    public int Priority {
+      get { return 250; }
+    }
+
+    public bool CanSerialize(Type type) {
+      return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(HashSet<>);
+    }
+
+    public string JustifyRejection(Type type) {
+      return "Type is not a generic HashSet<>";
+    }
+
+    public IEnumerable<Tag> CreateMetaInfo(object o) {
+      yield return new Tag("Comparer", o.GetType().GetProperty("Comparer").GetValue(o, null));
+    }
+
+    public IEnumerable<Tag> Decompose(object obj) {
+      foreach (object o in (IEnumerable)obj) {
+        yield return new Tag(o);
+      }
+    }
+
+    public object CreateInstance(Type type, IEnumerable<Tag> metaInfo) {
+      return Activator.CreateInstance(type, metaInfo.First().Value);
+    }
+
+    public void Populate(object instance, IEnumerable<Tag> tags, Type type) {
+      MethodInfo addMethod = type.GetMethod("Add");
+      try {
+        foreach (var tag in tags)
+          addMethod.Invoke(instance, new[] { tag.Value });
+      } catch (Exception e) {
+        throw new PersistenceException("Exception caught while trying to populate enumerable.", e);
+      }
+    }
+
+    public object HashSet { get; set; }
+  }
+}
