Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/05/11 05:21:34 (14 years ago)
Author:
swagner
Message:

Prevented that the ActualName of a LookupParameter is an empty string or just contains white spaces (#1341)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Parameters/3.3/LookupParameter.cs

    r5193 r5215  
    3838      set {
    3939        if (value == null) throw new ArgumentNullException();
    40         if (!actualName.Equals(value)) {
     40        if (string.IsNullOrWhiteSpace(value)) {
     41          actualName = Name;
     42          OnActualNameChanged();
     43        } else if (!actualName.Equals(value)) {
    4144          actualName = value;
    4245          OnActualNameChanged();
     
    7679    public LookupParameter(string name, string description, string actualName)
    7780      : base(name, description, typeof(T)) {
    78       this.actualName = actualName == null ? string.Empty : actualName;
     81      this.actualName = string.IsNullOrWhiteSpace(actualName) ? Name : actualName;
    7982    }
    8083
Note: See TracChangeset for help on using the changeset viewer.