Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/03/17 09:35:48 (7 years ago)
Author:
abeham
Message:

#2775: merged 15084 to stable

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Operators/3.3/MultiOperator.cs

    r14186 r15108  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425using HeuristicLab.Collections;
    2526using HeuristicLab.Common;
     
    5253      }
    5354    }
     55   
     56    IEnumerable<IOperator> IMultiOperator.Operators { get { return operators.AsEnumerable(); } }
    5457
    5558    [StorableConstructor]
     
    6972    private void AfterDeserialization() {
    7073      Initialize();
     74    }
     75
     76    public virtual bool AddOperator(IOperator op) {
     77      var tOp = op as T;
     78      if (tOp == null) return false;
     79      operators.Add(tOp);
     80      return true;
     81    }
     82
     83    public virtual bool RemoveOperator(IOperator op) {
     84      var tOp = op as T;
     85      if (tOp == null) return false;
     86      return operators.Remove(tOp);
    7187    }
    7288
Note: See TracChangeset for help on using the changeset viewer.