Changeset 1554 for trunk/sources/HeuristicLab.Persistence/3.3/Default
- Timestamp:
- 04/14/09 14:15:22 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Persistence/3.3/Default
- Files:
-
- 12 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/ViewOnly/ViewOnlyFormat.cs
r1553 r1554 45 45 public class Type2ViewFormatter : ValueType2ViewFormatter { 46 46 public override Type Type { get { return typeof(Type); } } 47 } 48 49 public class Float2ViewFormatter : ValueType2ViewFormatter { 50 public override Type Type { get { return typeof(float); } } 47 51 } 48 52 -
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 } -
trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Int2XmlFormatter.cs
r1454 r1554 2 2 using HeuristicLab.Persistence.Core; 3 3 using HeuristicLab.Persistence.Interfaces; 4 using System.Reflection; 5 using System.Globalization; 4 6 5 namespace HeuristicLab.Persistence.Default.Xml.Primitive { 7 namespace HeuristicLab.Persistence.Default.Xml.Primitive { 6 8 7 9 [EmptyStorableClass] 8 public class Int2XmlFormatter : IFormatter { 9 10 public Type Type { get { return typeof(int); } } 11 public IFormat Format { get { return XmlFormat.Instance; } } 12 13 public object DoFormat(object o) { 14 return ((int)o).ToString(); 15 } 16 17 public object Parse(object o) { 18 return int.Parse((string)o); 19 } 20 21 } 10 public class Int2XmlFormatter : SimpleNumber2XmlFormatterBase<int> { } 22 11 23 12 }
Note: See TracChangeset
for help on using the changeset viewer.