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

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

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

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

            return(_service.Continue(control));
        }