Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/17/14 03:22:32 (9 years ago)
Author:
swagner
Message:

#2205: Implemented review comments:

  • added cloning of Port in HookOperator and prevented cloning of hook operator ports in AlgorithmNode instead
  • added additional checks that port parameters of a hook operator port match with parameters of hook operator
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Operators/HookOperator.cs

    r11530 r11554  
    5151    protected HookOperator(HookOperator original, Cloner cloner)
    5252      : base(original, cloner) {
    53       // ATTENTION: port is intentionally NOT cloned
    54       port = original.port;
     53      port = cloner.Clone(original.port);
    5554    }
    5655    public HookOperator() : base() { }
     
    7372          if (Parameters.TryGetValue(output.Name, out param)) {
    7473            msg[output.Name] = param.ActualValue;
     74          } else if (output.DefaultValue == null) {
     75            throw new InvalidOperationException(string.Format("Cannot determine value for output parameter \"{0}\".", output.Name));
    7576          }
    7677        }
     
    8283          if (Parameters.TryGetValue(input.Name, out param)) {
    8384            param.ActualValue = msg[input.Name];
     85          } else {
     86            throw new InvalidOperationException(string.Format("Cannot find operator parameter for input parameter \"{0}\".", input.Name));
    8487          }
    8588        }
Note: See TracChangeset for help on using the changeset viewer.