Пример #1
0
        public virtual void Dispose()
        {
            DispatchService.RunPendingEvents();

            lock (progressTracker) {
                progressTracker.Done();
                if (c.waitEvent != null)
                {
                    c.waitEvent.Set();
                }
            }
            try {
                OnCompleted();
            } catch (Exception ex) {
                string msg = "Unhandled exception in monitor cancel event handler";
                LoggingService.LogInternalError(msg, ex);
            }
        }
Пример #2
0
        public virtual void Dispose()
        {
            // Make sure we are done with all pending calls
            // DispatchService.RunPendingEvents (); // Can trigger hard crash on OSX

            lock (progressTracker) {
                progressTracker.Done();
                if (c.waitEvent != null)
                {
                    c.waitEvent.Set();
                }
            }
            try {
                OnCompleted();
            } catch (Exception ex) {
                string msg = "Unhandled exception in monitor cancel event handler";
                LoggingService.LogError(msg, ex);
                MessageService.ShowException(ex, msg);
            }
        }