Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/02/16 14:03:54 (8 years ago)
Author:
gkronber
Message:

#2589: merged r13695 from trunk to stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Data/3.3

  • stable/HeuristicLab.Data/3.3/IntArray.cs

    r12009 r13979  
    2828  [Item("IntArray", "Represents an array of integer values.")]
    2929  [StorableClass]
    30   public class IntArray : ValueTypeArray<int>, IStringConvertibleArray {
     30  public class IntArray : StringConvertibleArray<int> {
    3131    [StorableConstructor]
    3232    protected IntArray(bool deserializing) : base(deserializing) { }
     
    4242    }
    4343
    44     protected virtual bool Validate(string value, out string errorMessage) {
     44    protected override bool Validate(string value, out string errorMessage) {
    4545      int val;
    4646      bool valid = int.TryParse(value, out val);
     
    5555      return valid;
    5656    }
    57     protected virtual string GetValue(int index) {
     57    protected override string GetValue(int index) {
    5858      return this[index].ToString();
    5959    }
    60     protected virtual bool SetValue(string value, int index) {
     60    protected override bool SetValue(string value, int index) {
    6161      int val;
    6262      if (int.TryParse(value, out val)) {
     
    6767      }
    6868    }
    69 
    70     #region IStringConvertibleArray Members
    71     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     #endregion
    8569  }
    8670}
Note: See TracChangeset for help on using the changeset viewer.