Ejemplo n.º 1
0
 public void Shutdown()
 {
     ShutdownImporterLoop();
     _messageQueue.Shutdown();
     _settings.Dispose();
     PersistPendingImportJobs();
 }
Ejemplo n.º 2
0
 public void Dispose()
 {
     if (_settings != null)
     {
         _settings.Dispose();
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Waits for all scheduled tasks to complete and disposes.
 /// </summary>
 public void Dispose()
 {
     UnsubscribeFromMessages();
     if (_settings != null)
     {
         _settings.Dispose();
         _settings = null;
     }
     CompleteBlocks();
 }
Ejemplo n.º 4
0
 public void Dispose()
 {
     if (_refreshRateChanger != null)
     {
         _refreshRateChanger.Dispose();
     }
     if (_settings != null)
     {
         _settings.Dispose();
     }
 }
Ejemplo n.º 5
0
 public override void Dispose()
 {
     base.Dispose();
     if (_delayedMenueUpdateEvent != null)
     {
         _delayedMenueUpdateEvent.Dispose();
     }
     if (_menuSettings != null)
     {
         _menuSettings.Dispose();
     }
 }
        public async void Shutdown()
        {
            if (_settings != null)
            {
                _settings.Dispose();
                _settings = null;
            }
            if (_converter != null)
            {
                await _converter.StopAllTranscodesAsync();

                await _converter.CleanUpTranscodeCacheAsync();

                _converter = null;
            }
        }
Ejemplo n.º 7
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");
        }
Ejemplo n.º 8
0
 public override void Dispose()
 {
     _settings.Dispose();
     base.Dispose();
 }
 public void Dispose()
 {
     _settingWatcher.Dispose();
 }
Ejemplo n.º 10
0
 public void Uninitialize()
 {
     _settingsChangeWatcher.Dispose();
 }
 public override void Dispose()
 {
     base.Dispose();
     _scriptableSettingWatcher.Dispose();
 }
Ejemplo n.º 12
0
 public void Dispose()
 {
     _settings?.Dispose();
 }
Ejemplo n.º 13
0
 public void Dispose()
 {
     _settings.Dispose();
     Shutdown(); // Make sure we're shut down
 }
Ejemplo n.º 14
0
 public void Dispose()
 {
     _browserService.Dispose();
     _settings.Dispose();
     UnregisterCredentials();
 }
Ejemplo n.º 15
0
 public void Dispose()
 {
     _settings.Dispose();
     EndBackgroundPlayback();
 }
Ejemplo n.º 16
0
 public virtual void Dispose()
 {
     _messageQueue.Shutdown();
     _settingWatcher.Dispose();
 }
Ejemplo n.º 17
0
 public void Dispose()
 {
     _lock?.Dispose();
     _settings?.Dispose();
 }
Ejemplo n.º 18
0
 public void Dispose()
 {
     _settings.Dispose();
     UnsubscribeFromMessages();
 }