public void Dispose() { _interval = 0; _backgroundWorkerActive = false; _worker.Stop(); _worker = null; }
public void Stop() { if (!stopped) { backgroundWorker.Stop(backgroundWorkerKey); stopped = true; } }
protected override void Dispose(bool disposing) { if (!disposed) { if (disposing) { backgroundWorker.Stop(backgroundWorkerKey); } disposed = true; } }