Changeset 5062 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/Jobs/OptimizerJob.cs
- Timestamp:
- 12/07/10 16:11:14 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources
- Property svn:ignore
-
old new 1 1 HeuristicLab.Hive-3.4.suo 2 TestResults
-
- Property svn:ignore
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/Jobs/OptimizerJob.cs
r4796 r5062 32 32 [StorableClass] 33 33 public class OptimizerJob : DeepCloneable, IJob { 34 public virtual bool IsParallelizable { 35 get { return this.Optimizer is Optimization.Experiment || this.Optimizer is BatchRun; } 36 } 37 34 38 [Storable] 35 39 protected IOptimizer optimizer; … … 81 85 this.log = new Log(); 82 86 } 83 public OptimizerJob(IOptimizer optimizer) 84 : this() { 87 public OptimizerJob(IOptimizer optimizer) : this() { 85 88 this.Optimizer = optimizer; 86 89 … … 95 98 [StorableConstructor] 96 99 protected OptimizerJob(bool deserializing) { } 97 protected OptimizerJob(OptimizerJob original, Cloner cloner) 98 : base(original, cloner) { 100 protected OptimizerJob(OptimizerJob original, Cloner cloner) : base(original, cloner) { 99 101 this.Optimizer = cloner.Clone(original.Optimizer); 100 102 this.log = cloner.Clone(original.Log); … … 135 137 public TimeSpan ExecutionTime { 136 138 get { return optimizer.ExecutionTime; } 137 }138 139 public virtual void Run() {140 throw new NotSupportedException();141 139 } 142 140 … … 152 150 optimizer.Start(); 153 151 } 152 } 153 154 public void Pause() { 155 throw new NotImplementedException(); 154 156 } 155 157 … … 301 303 if (handler != null) handler(this, new CancelEventArgs<string>(value, cancel)); 302 304 } 305 public event EventHandler ExecutionTimeChanged; 306 protected virtual void OnExecutionTimeChanged() { 307 EventHandler handler = ExecutionTimeChanged; 308 if (handler != null) handler(this, EventArgs.Empty); 309 } 310 public event EventHandler ExecutionStateChanged; 311 protected virtual void OnExecutionStateChanged() { 312 EventHandler handler = ExecutionStateChanged; 313 if (handler != null) handler(this, EventArgs.Empty); 314 } 303 315 #endregion 304 316 … … 330 342 return Name; 331 343 } 332 333 public virtual bool IsParallelizable {334 get { return this.Optimizer is Optimization.Experiment || this.Optimizer is BatchRun; }335 }336 337 344 } 338 345 }
Note: See TracChangeset
for help on using the changeset viewer.