Last change
on this file since 1835 was
1823,
checked in by epitzer, 16 years ago
|
Namespace refactoring: rename formatters & decomposers -> primitive and composite serializers. (#603)
|
File size:
919 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using HeuristicLab.Persistence.Core;
|
---|
3 | using System.Globalization;
|
---|
4 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
5 |
|
---|
6 | namespace HeuristicLab.Persistence.Default.Xml.Compact {
|
---|
7 |
|
---|
8 | public abstract class DoubleArray2XmlSerializerBase<T> : NumberArray2XmlSerializerBase<T> where T : class{
|
---|
9 |
|
---|
10 | protected override string FormatValue(object o) {
|
---|
11 | return ((double)o).ToString("r", CultureInfo.InvariantCulture);
|
---|
12 | }
|
---|
13 |
|
---|
14 | protected override object ParseValue(string o) {
|
---|
15 | return double.Parse(o);
|
---|
16 | }
|
---|
17 | }
|
---|
18 |
|
---|
19 | [EmptyStorableClass]
|
---|
20 | public class Double1DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[]> { }
|
---|
21 |
|
---|
22 |
|
---|
23 | [EmptyStorableClass]
|
---|
24 | public class Double2DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[,]> { }
|
---|
25 |
|
---|
26 | [EmptyStorableClass]
|
---|
27 | public class Double3DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[, ,]> { }
|
---|
28 |
|
---|
29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.