Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/19/18 13:35:52 (6 years ago)
Author:
mkommend
Message:

#2955: Used IsProblemDataCompatible and IsDatasetCompatible instead of now obselete AdjustProblemDataProperties when exchanging the problem data of data analysis solutions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisSolution.cs

    r15583 r16244  
    5858      get { return (IDataAnalysisProblemData)this[ProblemDataResultName].Value; }
    5959      set {
    60         if (this[ProblemDataResultName].Value != value) {
    61           if (value != null) {
    62             ProblemData.Changed -= new EventHandler(ProblemData_Changed);
    63             this[ProblemDataResultName].Value = value;
    64             ProblemData.Changed += new EventHandler(ProblemData_Changed);
    65             OnProblemDataChanged();
    66           }
    67         }
     60        if (value == null) throw new ArgumentNullException("The problemData must not be null.");
     61        if (this[ProblemDataResultName].Value == value) return;
     62        string errorMessage = string.Empty;
     63        if (!Model.IsProblemDataCompatible(value, out errorMessage)) throw new ArgumentException(errorMessage);
     64
     65        ProblemData.Changed -= new EventHandler(ProblemData_Changed);
     66        this[ProblemDataResultName].Value = value;
     67        ProblemData.Changed += new EventHandler(ProblemData_Changed);
     68        OnProblemDataChanged();
    6869      }
    6970    }
Note: See TracChangeset for help on using the changeset viewer.