internal void DoUninstall()
 {
     if (_messageQueue == null)
     {
         return;
     }
     _messageQueue.Shutdown();
     _messageQueue = null;
 }
 void UnsubscribeFromMessages()
 {
     if (_messageQueue == null)
     {
         return;
     }
     _messageQueue.Shutdown();
     _messageQueue = null;
 }
示例#3
0
 void DisposeMessageQueue()
 {
     if (_messageQueue == null)
     {
         return;
     }
     _messageQueue.Shutdown();
     _messageQueue = null;
 }
 public void Dispose()
 {
     if (_queue != null)
     {
         _queue.Shutdown();
     }
     _queue = null;
     WlanClient.Instance.Dispose();
 }
 /// <summary>
 /// Unsubscribe from message & stop focus stealing monitoring
 /// </summary>
 internal void UnsubscribeFromMessages()
 {
     if (_messageQueue == null)
     {
         return;
     }
     _messageQueue.Shutdown();
     _messageQueue = null;
     IsMonitoring  = false;
 }
示例#6
0
        public void Dispose()
        {
            _messageQueue.Shutdown();
            _maintenanceScheduler.Complete();
            _maintenanceScheduler.Completion.Wait();

            if (_connectionPool != null)
            {
                _connectionPool.Dispose();
                _connectionPool = null;
            }
        }
示例#7
0
 public void Dispose()
 {
     if (_pathBrowserCloseWatcher != null)
     {
         _pathBrowserCloseWatcher.Dispose();
     }
     _pathBrowserCloseWatcher = null;
     if (_queue != null)
     {
         _queue.Shutdown();
     }
     _queue = null;
 }
示例#8
0
 public void Shutdown()
 {
   UPnPServerWatcher watcher;
   UPnPClientControlPoint cp;
   lock (_syncObj)
   {
     watcher = _serverWatcher;
     cp = _controlPoint;
   }
   if (watcher != null)
     watcher.Stop();
   if (cp != null)
     cp.Stop();
   _messageQueue.Shutdown();
 }
示例#9
0
        private void DoShutdown()
        {
            if (_status == Status.Shutdown)
            {
                ServiceRegistration.Get <ILogger>().Warn("ImporterWorker: Shutdown was requested although status was already 'Shutdown'");
                return;
            }
            if (_status == Status.Activated)
            {
                DoSuspend();
            }

            _messageQueue.Shutdown();

            // Cancel all ImportJobs but do not dispose them, yet to be able to save them to disk
            foreach (var kvp in _importJobControllers)
            {
                kvp.Value.Cancel();
            }
            Task.WhenAll(_importJobControllers.Values.Select(i => i.Completion)).Wait();

            int numberOfPendingImportJobs = _importJobControllers.Count();

            PersistPendingImportJobs();
            if (numberOfPendingImportJobs > 0)
            {
                ServiceRegistration.Get <ILogger>().Info("ImporterWorker: Persisted {0} pending ImportJobs to disk.", numberOfPendingImportJobs);
            }

            foreach (var kvp in _importJobControllers)
            {
                kvp.Value.Dispose();
            }
            _settings.Dispose();

            _actionBlock.Complete();
            _status = Status.Shutdown;
            ServiceRegistration.Get <ILogger>().Info("ImporterWorker: Shutdown");
        }
 public void ExitModelContext(NavigationContext oldContext, NavigationContext newContext)
 {
     _messageQueue.Shutdown();
     if (OnlineVideoSettings.Instance.IsSiteUtilsListBuilt())
     {
         if (newDllsDownloaded)
         {
             Log.Info("Reloading SiteUtil Dlls at runtime.");
             DownloadManager.Instance.StopAll();
             OnlineVideoSettings.Reload();
             TranslationLoader.SetTranslationsToSingleton();
             GC.Collect();
             GC.WaitForFullGCComplete();
         }
         if (newDataSaved || newDllsDownloaded)
         {
             OnlineVideoSettings.Instance.BuildSiteUtilsList();
             ServiceRegistration.Get <IMessageBroker>().Send(OnlineVideosMessaging.CHANNEL, new SystemMessage(OnlineVideosMessaging.MessageType.RebuildSites));
         }
     }
     newDataSaved      = false;
     newDllsDownloaded = false;
 }
 public void ExitModelContext(NavigationContext oldContext, NavigationContext newContext)
 {
     lock (_syncObj)
         _mode = Mode.None;
     _messageQueue.Shutdown();
 }
 public void ExitModelContext(MediaPortal.UI.Presentation.Workflow.NavigationContext oldContext, MediaPortal.UI.Presentation.Workflow.NavigationContext newContext)
 {
     _messageQueue.Shutdown();
 }
示例#13
0
 public override void Dispose()
 {
     base.Dispose();
     _messageQueue.Shutdown();
 }
示例#14
0
 public virtual void Dispose()
 {
     _messageQueue.UnsubscribeFromAllMessageChannels();
     _messageQueue.Shutdown();
 }
示例#15
0
 public virtual void Dispose()
 {
     _messageQueue.Shutdown();
     _settingWatcher.Dispose();
 }
示例#16
0
 public void Dispose()
 {
     EndBackgroundPlayback();
     _messageQueue.Shutdown();
 }
示例#17
0
 private void OnMainFormClosed(object sender, FormClosedEventArgs e)
 {
     _messageQueue.Shutdown();
     _messageQueue = null;
 }
 public void Dispose()
 {
     _messageQueue.MessageReceived -= OnMessageReceived;
     _messageQueue.Shutdown();
 }
示例#19
0
 public void Dispose()
 {
     _messageQueue.MessageReceived -= PreviewMessage;
     _messageQueue.Shutdown();
 }
示例#20
0
 public void Shutdown()
 {
     _messageQueue.Shutdown();
     Close();
     _videoRenderFrameEvent.Close();
 }
 public void Shutdown()
 {
     _messageQueue.Shutdown();
 }
示例#22
0
 public void Dispose()
 {
     _messageQueue.Shutdown();
 }
示例#23
0
 public void UnregisterService()
 {
     _messageQueue.Shutdown();
     ServiceRegistration.RemoveAndDispose <ITvProvider>();
 }