Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/27/10 19:54:20 (14 years ago)
Author:
abeham
Message:

#1090

  • Fixed problem plugins reloading their operators on deserialization in following problems (forgot on them in the first commit)
    • SupportVectorRegressionProblem
    • SymbolicTimeSeriesPrognosisProblem
  • Fixed a bug in the FeatureSelectionProblem introduced in r4098
  • Fixed the issues mentioned in the code review of mkommend
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.FeatureSelection/3.3/FeatureSelectionProblem.cs

    r4098 r4118  
    9090
    9191    [StorableConstructor]
    92     private FeatureSelectionProblem(bool deserializing) : base() { }
     92    protected FeatureSelectionProblem(bool deserializing) : base(deserializing) { }
    9393    public FeatureSelectionProblem()
    9494      : base() {
     
    106106
    107107      InitializeOperators();
    108       AttachEventHandlers();
     108      RegisterParameterEvents();
     109      RegisterParameterValueEvents();
    109110    }
    110111
    111112    [StorableHook(HookType.AfterDeserialization)]
    112113    private void AfterDeserializationHook() {
     114      // BackwardsCompatibility3.3
     115      #region Backwards compatible code (remove with 3.4)
     116      if (operators == null) InitializeOperators();
     117      #endregion
    113118      RegisterParameterEvents();
    114119      RegisterParameterValueEvents();
     
    118123      FeatureSelectionProblem clone = (FeatureSelectionProblem)base.Clone(cloner);
    119124      clone.operators = operators.Select(x => (IOperator)cloner.Clone(x)).ToList();
    120       clone.AttachEventHandlers();
     125      clone.RegisterParameterEvents();
     126      clone.RegisterParameterValueEvents();
    121127      return clone;
    122128    }
     
    168174
    169175    #region Helpers
    170     private void AttachEventHandlers() {
    171       // Start BackwardsCompatibility3.3 (remove with 3.4)
    172       if (operators == null) InitializeOperators();
    173       // End BackwardsCompatibility3.3
    174       RegisterParameterEvents();
    175       RegisterParameterValueEvents();
    176     }
    177 
    178176    private void InitializeOperators() {
    179177      operators = new List<IOperator>();
Note: See TracChangeset for help on using the changeset viewer.