Changeset 9704


Ignore:
Timestamp:
07/15/13 14:09:46 (6 years ago)
Author:
mkommend
Message:

#2081: Merged trunk changes into path datatypes branch.

Location:
branches/HeuristicLab.Data Path DataTypes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Data Path DataTypes/HeuristicLab.Data

  • branches/HeuristicLab.Data Path DataTypes/HeuristicLab.Data.Views

  • branches/HeuristicLab.Data Path DataTypes/HeuristicLab.Data/3.3/StringArray.cs

    r9657 r9704  
    5151        if (value == null || !value.Any())
    5252          elementNames = new List<string>();
    53         else if (value.Count() != Length)
    54           throw new ArgumentException("An element name must be specified for each element.");
     53        else if (value.Count() > Length)
     54          throw new ArgumentException("The number of element names must not exceed the array length.");
    5555        else
    5656          elementNames = new List<string>(value);
     
    6767          while (elementNames.Count > value)
    6868            elementNames.RemoveAt(elementNames.Count - 1);
    69           while (elementNames.Count < value)
    70             elementNames.Add("Element " + elementNames.Count);
    7169          OnElementNamesChanged();
    7270          OnReset();
  • branches/HeuristicLab.Data Path DataTypes/HeuristicLab.Data/3.3/ValueTypeArray.cs

    r9657 r9704  
    5151        if (value == null || !value.Any())
    5252          elementNames = new List<string>();
    53         else if (value.Count() != Length)
    54           throw new ArgumentException("An element name must be specified for each element.");
     53        else if (value.Count() > Length)
     54          throw new ArgumentException("The number of element names must not exceed the array length.");
    5555        else
    5656          elementNames = new List<string>(value);
     
    6969          while (elementNames.Count > value)
    7070            elementNames.RemoveAt(elementNames.Count - 1);
    71           while (elementNames.Count < value)
    72             elementNames.Add("Element " + elementNames.Count);
    7371          OnElementNamesChanged();
    7472          OnReset();
Note: See TracChangeset for help on using the changeset viewer.