Esempio n. 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");
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 3
0
 public bool Pause(HostControl hostControl)
 {
     return(_serviceHandle.Pause(hostControl));
 }
Esempio n. 4
0
 bool ServiceHandle.Pause(HostControl hostControl)
 {
     return(_service.Pause(_hostControl));
 }
Esempio n. 5
0
        bool ServiceHandle.Pause(HostControl hostControl)
        {
            var control = new AppDomainHostControl(this);

            return(_service.Pause(control));
        }