private void optimizer_Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs <IRun> e)
 {
     lock (runsLocker) {
         Runs.RemoveRange(e.OldItems);
         Runs.AddRange(e.Items);
     }
 }
 private void RemoveOptimizer(IOptimizer optimizer)
 {
     DeregisterOptimizerEvents(optimizer);
     Runs.RemoveRange(optimizer.Runs);
     if (ExecutionState == ExecutionState.Prepared && !optimizers.Any(opt => opt.ExecutionState == ExecutionState.Prepared))
     {
         OnStopped();
     }
 }
 private void optimizer_Runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs <IRun> e)
 {
     lock (runsLocker)
         Runs.RemoveRange(e.Items);
 }