Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/15/10 05:26:02 (14 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • worked on operators, parameters and problems
File:
1 edited

Legend:

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

    r2793 r2796  
    4747      }
    4848    }
    49     public new T ActualValue {
     49    IItem IValueParameter.Value {
    5050      get { return Value; }
    51       set { Value = value; }
     51      set {
     52        T val = value as T;
     53        if (val == null)
     54          throw new InvalidOperationException(
     55            string.Format("Type mismatch. Value is not a \"{0}\".",
     56                          typeof(T).GetPrettyName())
     57          );
     58        Value = val;
     59      }
    5260    }
    5361
     
    8492    }
    8593    protected override void SetActualValue(IItem value) {
    86       T val = value as T;
    87       if (val == null)
    88         throw new InvalidOperationException(
    89           string.Format("Type mismatch. Value is not a \"{0}\".",
    90                         typeof(T).GetPrettyName())
    91         );
    92       Value = val;
     94      ((IValueParameter)this).Value = value;
    9395    }
    9496
Note: See TracChangeset for help on using the changeset viewer.