Changeset 15280 for branches/Async/HeuristicLab.Data/3.3/DoubleArray.cs
- Timestamp:
- 07/23/17 00:52:14 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Async
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.Data/3.3
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Data/3.3 (added) merged: 13397,13695
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.Data/3.3/DoubleArray.cs
r12432 r15280 28 28 [Item("DoubleArray", "Represents an array of double values.")] 29 29 [StorableClass] 30 public class DoubleArray : ValueTypeArray<double>, IStringConvertibleArray{30 public class DoubleArray : StringConvertibleArray<double> { 31 31 [StorableConstructor] 32 32 protected DoubleArray(bool deserializing) : base(deserializing) { } … … 42 42 } 43 43 44 protected virtualbool Validate(string value, out string errorMessage) {44 protected override bool Validate(string value, out string errorMessage) { 45 45 double val; 46 46 bool valid = double.TryParse(value, out val); … … 55 55 return valid; 56 56 } 57 protected virtualstring GetValue(int index) {57 protected override string GetValue(int index) { 58 58 return this[index].ToString("r"); 59 59 } 60 protected virtualbool SetValue(string value, int index) {60 protected override bool SetValue(string value, int index) { 61 61 double val; 62 62 if (double.TryParse(value, out val)) { … … 67 67 } 68 68 } 69 70 #region IStringConvertibleArray Members71 int IStringConvertibleArray.Length {72 get { return Length; }73 set { Length = value; }74 }75 bool IStringConvertibleArray.Validate(string value, out string errorMessage) {76 return Validate(value, out errorMessage);77 }78 string IStringConvertibleArray.GetValue(int index) {79 return GetValue(index);80 }81 bool IStringConvertibleArray.SetValue(string value, int index) {82 return SetValue(value, index);83 }84 #endregion85 69 } 86 70 }
Note: See TracChangeset
for help on using the changeset viewer.