public void Dispose() { #region Guard if (disposed) { return; } #endregion if (IsRunning) { Stop(); } disposed = true; OnDisposed(EventArgs.Empty); }