Changeset 1554 for trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlFormatter.cs
- Timestamp:
- 04/14/09 14:15:22 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlFormatter.cs
r1454 r1554 1 1 using System; 2 using System.Globalization;3 2 using HeuristicLab.Persistence.Core; 4 3 using HeuristicLab.Persistence.Interfaces; 4 using System.Reflection; 5 using System.Globalization; 5 6 6 namespace HeuristicLab.Persistence.Default.Xml.Primitive { 7 7 namespace HeuristicLab.Persistence.Default.Xml.Primitive { 8 8 9 [EmptyStorableClass] 9 public class Double2XmlFormatter : IFormatter { 10 11 public Type Type { get { return typeof(double); } } 12 public IFormat Format { get { return XmlFormat.Instance; } } 13 14 public object DoFormat(object o) { 15 return ((double)o).ToString("r", CultureInfo.InvariantCulture); 16 } 17 18 public object Parse(object o) { 19 return double.Parse((string)o, CultureInfo.InvariantCulture); 20 } 21 22 } 10 public class Double2XmlFormatter : DecimalNumber2XmlFormatterBase<double> { } 23 11 24 12 }
Note: See TracChangeset
for help on using the changeset viewer.