Changeset 4903 for branches/HeuristicLab.DebugEngine/DebugEngine.cs
- Timestamp:
- 11/22/10 14:08:18 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DebugEngine/DebugEngine.cs
r4871 r4903 22 22 using System; 23 23 using System.Linq; 24 using System. Collections.Generic;24 using System.Threading; 25 25 using HeuristicLab.Common; 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Collections;29 using System.Threading;30 28 31 29 namespace HeuristicLab.DebugEngine { … … 35 33 public class DebugEngine : Executable, IEngine { 36 34 37 38 35 #region Construction and Cloning 39 36 40 37 [StorableConstructor] 41 protected DebugEngine(bool deserializing) : base(deserializing) { 38 protected DebugEngine(bool deserializing) 39 : base(deserializing) { 42 40 pausePending = stopPending = false; 43 41 timer = new System.Timers.Timer(100); … … 45 43 timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed); 46 44 } 47 protected DebugEngine(DebugEngine original, Cloner cloner) : base(original, cloner) { 45 protected DebugEngine(DebugEngine original, Cloner cloner) 46 : base(original, cloner) { 48 47 if (original.ExecutionState == ExecutionState.Started) throw new InvalidOperationException(string.Format("Clone not allowed in execution state \"{0}\".", ExecutionState)); 49 48 Log = cloner.Clone(original.Log); … … 84 83 private DateTime lastUpdateTime; 85 84 private System.Timers.Timer timer; 86 85 87 86 [Storable] 88 87 private IOperator currentOperator; … … 108 107 109 108 public virtual IExecutionContext CurrentExecutionContext { 110 get { return CurrentOperation as IExecutionContext; 109 get { return CurrentOperation as IExecutionContext; } 111 110 } 112 111 … … 153 152 ignoreNextBreakpoint = true; 154 153 timer.Start(); 155 ProcessNextOperation(); 154 ProcessNextOperation(); 156 155 timer.Stop(); 157 156 ExecutionTime += DateTime.Now - lastUpdateTime; … … 165 164 ThreadPool.QueueUserWorkItem(new WaitCallback(Run), null); 166 165 } 167 166 168 167 protected override void OnStarted() { 169 168 Log.LogMessage("Engine started"); … … 190 189 if (ExecutionState == ExecutionState.Paused) OnStopped(); 191 190 } 192 191 193 192 protected override void OnStopped() { 194 193 Log.LogMessage("Engine stopped");
Note: See TracChangeset
for help on using the changeset viewer.