public void Stop() { if (_strategy == null) { return; } lock (SyncRoot) { if (_strategy == null) { return; } // Stop strategy _strategy?.Stop(); // Fill results _results.Clear(); if (_strategy == null) { return; } _results.AddRange(_strategy.GetResults()); _strategy = null; } }
public void Stop() { if (_running) { lock (SyncRoot) { if (_running) { _running = false; // Null strategy to avoid double entry if (_strategy != null) { _strategy.Stop(); _strategy = null; } NotifyUpdated(ExecutionState.Completed); } } } }
public void Stop() { _strategy.Stop(); }