Exemple #1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                CancelAttemptIfBusy();

                CancellationSource?.Dispose();
                callbackHandler.Dispose();
            }

            base.Dispose(disposing);
        }
Exemple #2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (IsBusy)
                {
                    CancellationSource.Cancel();
                }

                CancellationSource?.Dispose();
                callbackHandler.Dispose();
            }

            base.Dispose(disposing);
        }