Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/ViewOnly/ViewOnlyFormat.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/ViewOnly/ViewOnlyFormat.cs	(revision 1553)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/ViewOnly/ViewOnlyFormat.cs	(revision 1554)
@@ -45,4 +45,8 @@
   public class Type2ViewFormatter : ValueType2ViewFormatter {
     public override Type Type { get { return typeof(Type); } }
+  }
+
+  public class Float2ViewFormatter : ValueType2ViewFormatter {
+    public override Type Type { get { return typeof(float); } }
   }
 
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Bool2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Bool2XmlFormatter.cs	(revision 1554)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Bool2XmlFormatter.cs	(revision 1554)
@@ -0,0 +1,12 @@
+﻿using System;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
+
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+  
+  [EmptyStorableClass]
+  public class Bool2XmlFormatter : SimpleNumber2XmlFormatterBase<bool> { }
+  
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Boolean2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Boolean2XmlFormatter.cs	(revision 1553)
+++ 	(revision )
@@ -1,23 +1,0 @@
-﻿using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-
-namespace HeuristicLab.Persistence.Default.Xml.Primitive {
-
-  [EmptyStorableClass]
-  public class Boolean2XmlFormatter : IFormatter {    
-
-    public Type Type { get { return typeof(bool); } }
-    public IFormat Format { get { return XmlFormat.Instance; } }
-
-    public object DoFormat(object o) {
-      return ((bool)o).ToString();
-    }
-
-    public object Parse(object o) {
-      return bool.Parse((string)o);
-    }
-
-  }  
-
-}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Byte2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Byte2XmlFormatter.cs	(revision 1554)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Byte2XmlFormatter.cs	(revision 1554)
@@ -0,0 +1,12 @@
+﻿using System;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
+
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+  
+  [EmptyStorableClass]
+  public class Byte2XmlFormatter : SimpleNumber2XmlFormatterBase<byte> { }
+  
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Decimal2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Decimal2XmlFormatter.cs	(revision 1554)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Decimal2XmlFormatter.cs	(revision 1554)
@@ -0,0 +1,12 @@
+﻿using System;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
+
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+  
+  [EmptyStorableClass]
+  public class Decimal2XmlFormatter : DecimalNumber2XmlFormatterBase<decimal> { }
+  
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DecimalNumber2XmlFormatterBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DecimalNumber2XmlFormatterBase.cs	(revision 1554)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DecimalNumber2XmlFormatterBase.cs	(revision 1554)
@@ -0,0 +1,40 @@
+﻿using System;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
+
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+  
+  public abstract class DecimalNumber2XmlFormatterBase<T> : IFormatter {
+
+    public Type Type { get { return typeof(T); } }
+
+    public IFormat Format { get { return XmlFormat.Instance; } }
+
+    private static MethodInfo ToStringMethod = typeof(T)
+      .GetMethod(
+        "ToString",
+        BindingFlags.Instance | BindingFlags.Public,
+        null,
+        CallingConventions.Standard,
+        new[] { typeof(string), typeof(IFormatProvider) },
+        null);
+
+    private static MethodInfo ParseMethod = typeof(T)
+      .GetMethod(
+        "Parse",
+        BindingFlags.Static | BindingFlags.Public,
+        null,
+        CallingConventions.Standard,
+        new[] { typeof(string), typeof(IFormatProvider) },
+        null);
+
+    public object DoFormat(object o) {
+      return ToStringMethod.Invoke(o, new object[] { "r", CultureInfo.InvariantCulture });
+    }
+    public object Parse(object o) {      
+      return ParseMethod.Invoke(null, new[] { o, CultureInfo.InvariantCulture });
+    }
+  }  
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlFormatter.cs	(revision 1553)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlFormatter.cs	(revision 1554)
@@ -1,24 +1,12 @@
 ﻿using System;
-using System.Globalization;
 using HeuristicLab.Persistence.Core;
 using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
 
-namespace HeuristicLab.Persistence.Default.Xml.Primitive {
-
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+    
   [EmptyStorableClass]
-  public class Double2XmlFormatter : IFormatter {    
-
-    public Type Type { get { return typeof(double); } }
-    public IFormat Format { get { return XmlFormat.Instance; } }
-
-    public object DoFormat(object o) {
-      return ((double)o).ToString("r", CultureInfo.InvariantCulture);      
-    }
-
-    public object Parse(object o) {
-      return double.Parse((string)o, CultureInfo.InvariantCulture);
-    }
-
-  }
+  public class Double2XmlFormatter : DecimalNumber2XmlFormatterBase<double> { }
   
 }
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Float2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Float2XmlFormatter.cs	(revision 1554)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Float2XmlFormatter.cs	(revision 1554)
@@ -0,0 +1,12 @@
+﻿using System;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
+
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+   
+  [EmptyStorableClass]
+  public class Float2XmlFormatter : DecimalNumber2XmlFormatterBase<float> { }
+  
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Int2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Int2XmlFormatter.cs	(revision 1553)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Int2XmlFormatter.cs	(revision 1554)
@@ -2,22 +2,11 @@
 using HeuristicLab.Persistence.Core;
 using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
 
-namespace HeuristicLab.Persistence.Default.Xml.Primitive {
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
 
   [EmptyStorableClass]
-  public class Int2XmlFormatter : IFormatter {
-
-    public Type Type { get { return typeof(int); } }
-    public IFormat Format { get { return XmlFormat.Instance; } }
-
-    public object DoFormat(object o) {
-      return ((int)o).ToString();
-    }
-
-    public object Parse(object o) {
-      return int.Parse((string)o);
-    }
-
-  }
+  public class Int2XmlFormatter : SimpleNumber2XmlFormatterBase<int> { }
   
 }
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Long2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Long2XmlFormatter.cs	(revision 1554)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Long2XmlFormatter.cs	(revision 1554)
@@ -0,0 +1,12 @@
+﻿using System;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
+
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+
+  [EmptyStorableClass]
+  public class Long2XmlFormatter : SimpleNumber2XmlFormatterBase<long> { }
+  
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SByte2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SByte2XmlFormatter.cs	(revision 1554)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SByte2XmlFormatter.cs	(revision 1554)
@@ -0,0 +1,12 @@
+﻿using System;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
+
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+  
+  [EmptyStorableClass]
+  public class Sbyte2XmlFormatter : SimpleNumber2XmlFormatterBase<sbyte> { }
+  
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Short2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Short2XmlFormatter.cs	(revision 1554)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Short2XmlFormatter.cs	(revision 1554)
@@ -0,0 +1,12 @@
+﻿using System;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
+
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+  
+  [EmptyStorableClass]
+  public class Short2XmlFormatter : SimpleNumber2XmlFormatterBase<short> { }
+  
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlFormatterBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlFormatterBase.cs	(revision 1554)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlFormatterBase.cs	(revision 1554)
@@ -0,0 +1,31 @@
+﻿using System;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
+
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+
+  public abstract class SimpleNumber2XmlFormatterBase<T> : IFormatter {
+
+    public Type Type { get { return typeof(T); } }
+
+    public IFormat Format { get { return XmlFormat.Instance; } }
+
+    private static MethodInfo ParseMethod = typeof(T)
+      .GetMethod(
+        "Parse",
+        BindingFlags.Static | BindingFlags.Public,
+        null,
+        CallingConventions.Standard,
+        new[] { typeof(string) },
+        null);
+
+    public object DoFormat(object o) {
+      return ((T)o).ToString();
+    }
+    public object Parse(object o) {
+      return ParseMethod.Invoke(null, new[] { o });      
+    }
+  }  
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UInt2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UInt2XmlFormatter.cs	(revision 1554)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UInt2XmlFormatter.cs	(revision 1554)
@@ -0,0 +1,12 @@
+﻿using System;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
+
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+  
+  [EmptyStorableClass]
+  public class UInt2XmlFormatter : SimpleNumber2XmlFormatterBase<uint> { }
+  
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/ULong2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/ULong2XmlFormatter.cs	(revision 1554)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/ULong2XmlFormatter.cs	(revision 1554)
@@ -0,0 +1,12 @@
+﻿using System;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
+
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+  
+  [EmptyStorableClass]
+  public class ULong2XmlFormatter : SimpleNumber2XmlFormatterBase<ulong> { }  
+  
+}
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UShort2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UShort2XmlFormatter.cs	(revision 1554)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UShort2XmlFormatter.cs	(revision 1554)
@@ -0,0 +1,12 @@
+﻿using System;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
+using System.Globalization;
+
+namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
+  
+  [EmptyStorableClass]
+  public class UShort2XmlFormatter : SimpleNumber2XmlFormatterBase<ushort> { }
+  
+}
