Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14103


Ignore:
Timestamp:
07/18/16 17:09:07 (8 years ago)
Author:
abeham
Message:

#2566: implemented hard cast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators/3.3/InstrumentedOperator.cs

    r13566 r14103  
    8484      foreach (var b in base.GetCollectedValues(param)) yield return b;
    8585      if (param != BeforeExecutionOperatorsParameter && param != AfterExecutionOperatorsParameter) yield break;
    86       var operatorList = param.Value as OperatorList;
    87       if (operatorList != null) {
    88         var counter = 0;
    89         foreach (var op in operatorList) {
    90           yield return new KeyValuePair<string, IItem>(counter.ToString(), op);
    91           var children = new Dictionary<string, IItem>();
    92           op.CollectParameterValues(children);
    93           foreach (var c in children) yield return new KeyValuePair<string, IItem>(counter + "." + c.Key, c.Value);
    94           counter++;
    95         }
     86      var operatorList = (OperatorList)param.Value;
     87      var counter = 0;
     88      foreach (var op in operatorList) {
     89        yield return new KeyValuePair<string, IItem>(counter.ToString(), op);
     90        var children = new Dictionary<string, IItem>();
     91        op.CollectParameterValues(children);
     92        foreach (var c in children) yield return new KeyValuePair<string, IItem>(counter + "." + c.Key, c.Value);
     93        counter++;
    9694      }
    9795    }
Note: See TracChangeset for help on using the changeset viewer.