Exemple #1
0
        protected override void OnPause()
        {
            try
            {
                _log.Info("[Topshelf] Pausing service");

                _serviceHandle.Pause(this);
            }
            catch (Exception ex)
            {
                _log.Fatal("The service did not shut down gracefully", ex);
                throw;
            }
            finally
            {
                _log.Info("[Topshelf] Paused");
            }
        }
Exemple #2
0
        protected override void OnPause()
        {
            try
            {
                _log.Info("[Topshelf] Pausing service");

                if (!_serviceHandle.Pause(this))
                {
                    throw new TopshelfException("The service did not pause successfully (returned false).");
                }

                _log.Info("[Topshelf] Paused");
            }
            catch (Exception ex)
            {
                _log.Fatal("The service did not pause gracefully", ex);
                throw;
            }
        }
Exemple #3
0
 public bool Pause(HostControl hostControl)
 {
     return(_serviceHandle.Pause(hostControl));
 }
Exemple #4
0
 bool ServiceHandle.Pause(HostControl hostControl)
 {
     return(_service.Pause(_hostControl));
 }
        bool ServiceHandle.Pause(HostControl hostControl)
        {
            var control = new AppDomainHostControl(this);

            return(_service.Pause(control));
        }