Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/07/10 16:11:14 (14 years ago)
Author:
cneumuel
Message:

#1233

  • implemented MockService, MockJob, MockServiceLocator
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  
        11HeuristicLab.Hive-3.4.suo
         2TestResults
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/Jobs/OptimizerJob.cs

    r4796 r5062  
    3232  [StorableClass]
    3333  public class OptimizerJob : DeepCloneable, IJob {
     34    public virtual bool IsParallelizable {
     35      get { return this.Optimizer is Optimization.Experiment || this.Optimizer is BatchRun; }
     36    }
     37
    3438    [Storable]
    3539    protected IOptimizer optimizer;
     
    8185      this.log = new Log();
    8286    }
    83     public OptimizerJob(IOptimizer optimizer)
    84       : this() {
     87    public OptimizerJob(IOptimizer optimizer) : this() {
    8588      this.Optimizer = optimizer;
    8689
     
    9598    [StorableConstructor]
    9699    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) {
    99101      this.Optimizer = cloner.Clone(original.Optimizer);
    100102      this.log = cloner.Clone(original.Log);
     
    135137    public TimeSpan ExecutionTime {
    136138      get { return optimizer.ExecutionTime; }
    137     }
    138 
    139     public virtual void Run() {
    140       throw new NotSupportedException();
    141139    }
    142140
     
    152150        optimizer.Start();
    153151      }
     152    }
     153
     154    public void Pause() {
     155      throw new NotImplementedException();
    154156    }
    155157
     
    301303      if (handler != null) handler(this, new CancelEventArgs<string>(value, cancel));
    302304    }
     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    }
    303315    #endregion
    304316
     
    330342      return Name;
    331343    }
    332 
    333     public virtual bool IsParallelizable {
    334       get { return this.Optimizer is Optimization.Experiment || this.Optimizer is BatchRun; }
    335     }
    336 
    337344  }
    338345}
Note: See TracChangeset for help on using the changeset viewer.