public void InvokeShutdown()
 {
     this.VerifyAccess();
     if (this._hasShutdownFinished)
     {
         throw new InvalidOperationException();
     }
     try
     {
         if (this._hasShutdownStarted)
         {
             return;
         }
         // ISSUE: reference to a compiler-generated field
         GHIElectronics.TinyCLR.UI.EventHandler shutdownStarted = this.ShutdownStarted;
         if (shutdownStarted != null)
         {
             shutdownStarted((object)this, EventArgs.Empty);
         }
         this._hasShutdownStarted = true;
         if (this._frameDepth <= 0)
         {
             this.ShutdownImpl();
         }
         Dispatcher._dispatchers.Remove((object)this._thread.ManagedThreadId);
     }
     catch (Exception ex)
     {
         if (this._finalExceptionHandler != null && this._finalExceptionHandler((object)this, ex))
         {
             return;
         }
         throw;
     }
 }
 private object FireTick(object unused)
 {
     // ISSUE: reference to a compiler-generated field
     GHIElectronics.TinyCLR.UI.EventHandler tick = this.Tick;
     if (tick != null)
     {
         tick((object)this, EventArgs.Empty);
     }
     return((object)null);
 }
 internal void OnCompleted()
 {
     // ISSUE: reference to a compiler-generated field
     GHIElectronics.TinyCLR.UI.EventHandler completed = this.Completed;
     if (completed == null)
     {
         return;
     }
     completed((object)this, EventArgs.Empty);
 }
 private void ShutdownImpl()
 {
     // ISSUE: reference to a compiler-generated field
     GHIElectronics.TinyCLR.UI.EventHandler shutdownFinished = this.ShutdownFinished;
     if (shutdownFinished != null)
     {
         shutdownFinished((object)this, EventArgs.Empty);
     }
     this._hasShutdownFinished = true;
     lock (this._instanceLock)
     {
         while (this._queue.Count > 0)
         {
             ((DispatcherOperation)_queue.Dequeue()).Abort();
         }
     }
 }
        public bool Abort()
        {
            int num = this._dispatcher.Abort(this) ? 1 : 0;

            if (num == 0)
            {
                return(num != 0);
            }
            this._status = DispatcherOperationStatus.Aborted;
            // ISSUE: reference to a compiler-generated field
            GHIElectronics.TinyCLR.UI.EventHandler aborted = this.Aborted;
            if (aborted == null)
            {
                return(num != 0);
            }
            aborted((object)this, EventArgs.Empty);
            return(num != 0);
        }