BclExtras.Threading.ProgressTrackerFactory.DestroyProgressTracker C# (CSharp) Méthode

DestroyProgressTracker() public méthode

Destroy the IProgressTracker previously returned from CreateProgressTracker. This can be called from any thread
public DestroyProgressTracker ( IProgressTracker tracker ) : void
tracker IProgressTracker
Résultat void
        public virtual void DestroyProgressTracker(IProgressTracker tracker)
        {
            // Nothing to do
        }

Usage Example

Exemple #1
0
        internal void OperationFinished()
        {
            lock (m_lock)
            {
                m_finished = true;

                // Close the tracker if it's open.  Make sure to invoke the close so
                // that it occurs on the proper thread
                if (m_tracker != null)
                {
                    // A race condition can occur as to who shuts down first so make sure to swallow
                    // that exception here
                    SafeInvoke.BeginInvokeNoThrow(
                        m_tracker,
                        () => m_factory.DestroyProgressTracker(m_tracker));
                }
            }
        }