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

            return(_service.Pause(control));
        }