Changeset 10113 for branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3
- Timestamp:
- 11/07/13 12:57:40 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RunCollectionModifiers/RunCollectionModifierTask.cs
r10111 r10113 30 30 using HeuristicLab.Hive; 31 31 using HeuristicLab.Optimization; 32 using HeuristicLab.Parameters; 32 33 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 33 34 … … 35 36 [Item("RunCollectionModifierTask", "An item that runs RunCollectionModifiers on RunCollections with Hive support.")] 36 37 [StorableClass] 37 public class RunCollectionModifierTask : NamedItem, ITask {38 public class RunCollectionModifierTask : ParameterizedNamedItem, ITask { 38 39 public virtual bool IsParallelizable { 39 40 get { return false; } … … 71 72 } 72 73 73 [Storable] 74 protected ItemList<IRunCollectionModifier> runCollectionModifiers; 74 public ValueParameter<ItemList<IRunCollectionModifier>> RunCollectionModifiersParameter { 75 get { return (ValueParameter<ItemList<IRunCollectionModifier>>)Parameters["RunCollectionModifiers"]; } 76 } 75 77 public ItemList<IRunCollectionModifier> RunCollectionModifiers { 76 get { return runCollectionModifiers; }78 get { return RunCollectionModifiersParameter.Value; } 77 79 } 78 80 … … 100 102 #region Constructors and Cloning 101 103 public RunCollectionModifierTask() { 102 runCollectionModifiers = new ItemList<IRunCollectionModifier>();104 Parameters.Add(new ValueParameter<ItemList<IRunCollectionModifier>>("RunCollectionModifiers", "List of RunCollectionModifiers that are executed. ", new ItemList<IRunCollectionModifier>())); 103 105 executionStack = new Stack<IRunCollectionModifier>(); 106 runCollection = new RunCollection(); 104 107 log = new Log(); 105 108 } … … 110 113 executionTime = original.executionTime; 111 114 executionState = original.executionState; 112 runCollectionModifiers = (ItemList<IRunCollectionModifier>)original.RunCollectionModifiers.Clone(cloner);113 115 runCollection = (RunCollection)original.runCollection.Clone(cloner); 114 116 executionStack = new Stack<IRunCollectionModifier>(); … … 172 174 173 175 public virtual void AddRunCollectionModifiers(IRunCollectionModifier modifier) { 174 runCollectionModifiers.Add(modifier);176 RunCollectionModifiers.Add(modifier); 175 177 } 176 178
Note: See TracChangeset
for help on using the changeset viewer.