Changeset 7615 for branches/HeuristicLab.TimeSeries/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs
- Timestamp:
- 03/15/12 09:11:17 (13 years ago)
- Location:
- branches/HeuristicLab.TimeSeries
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs
r7268 r7615 240 240 } 241 241 242 protected override IEnumerable<KeyValuePair<string, IItem>> GetCollectedValues(IItem value) { 243 var children = base.GetCollectedValues(value); 244 foreach (var child in children) { 245 if (child.Value is IOperator) 246 yield return new KeyValuePair<string, IItem>(child.Key, new StringValue(((IOperator)child.Value).Name)); 247 else yield return child; 248 } 249 } 250 242 251 #region Events 243 252 public event EventHandler ExecutionStateChanged; … … 265 274 ExecutionState = ExecutionState.Prepared; 266 275 ExecutionTime = TimeSpan.Zero; 267 foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects( ).OfType<IStatefulItem>()) {276 foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects(new HashSet<string>() { "runs" }).OfType<IStatefulItem>()) { 268 277 statefulObject.InitializeState(); 269 278 } … … 286 295 protected virtual void OnStopped() { 287 296 ExecutionState = ExecutionState.Stopped; 288 foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects( ).OfType<IStatefulItem>()) {297 foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects(new HashSet<string>() { "runs" }).OfType<IStatefulItem>()) { 289 298 statefulObject.ClearState(); 290 299 }
Note: See TracChangeset
for help on using the changeset viewer.