Changeset 14800
- Timestamp:
- 03/30/17 16:54:05 (8 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 14433
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Optimization
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Optimization merged: 14433
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs
r14186 r14800 289 289 public event EventHandler Stopped; 290 290 protected virtual void OnStopped() { 291 foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects(new HashSet<object>() { Runs }).OfType<IStatefulItem>()) { 292 statefulObject.ClearState(); 293 } 294 runsCounter++; 295 runs.Add(new Run(string.Format("{0} Run {1}", Name, runsCounter), this)); 296 ExecutionState = ExecutionState.Stopped; 297 EventHandler handler = Stopped; 298 if (handler != null) handler(this, EventArgs.Empty); 291 try { 292 foreach ( 293 IStatefulItem statefulObject in 294 this.GetObjectGraphObjects(new HashSet<object>() {Runs}).OfType<IStatefulItem>()) { 295 statefulObject.ClearState(); 296 } 297 runsCounter++; 298 try { 299 runs.Add(new Run(string.Format("{0} Run {1}", Name, runsCounter), this)); 300 } 301 catch (ArgumentException e) { 302 OnExceptionOccurred(new InvalidOperationException("Run creation failed.", e)); 303 } 304 } 305 finally { 306 ExecutionState = ExecutionState.Stopped; 307 EventHandler handler = Stopped; 308 if (handler != null) handler(this, EventArgs.Empty); 309 } 299 310 } 300 311 public event EventHandler<EventArgs<Exception>> ExceptionOccurred;
Note: See TracChangeset
for help on using the changeset viewer.