Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3439


Ignore:
Timestamp:
04/20/10 15:13:38 (15 years ago)
Author:
abeham
Message:

Updated ConditionalBranch to return false branch when condition is not found #984

File:
1 edited

Legend:

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

    r3376 r3439  
    3030  /// A branch of two operators whose executions depend on a condition.
    3131  /// </summary>
    32   [Item("ConditionalBranch", "A branch of two operators whose executions depend on a boolean condition.")]
     32  [Item("ConditionalBranch", "A branch of two operators whose executions depend on a boolean condition. If the boolean condition is not present, the false branch is executed.")]
    3333  [StorableClass]
    3434  public class ConditionalBranch : SingleSuccessorOperator {
     
    6060    public override IOperation Apply() {
    6161      OperationCollection next = new OperationCollection(base.Apply());
    62       if (ConditionParameter.ActualValue.Value) {
     62      if (ConditionParameter.ActualValue != null && ConditionParameter.ActualValue.Value) {
    6363        if (TrueBranch != null) next.Insert(0, ExecutionContext.CreateOperation(TrueBranch));
    6464      } else {
Note: See TracChangeset for help on using the changeset viewer.