pGina.Service.Impl.ServiceThread.OnCustomCommand C# (CSharp) Method

OnCustomCommand() public method

public OnCustomCommand ( ) : System.Boolean
return System.Boolean
        public Boolean OnCustomCommand()
        {
            return m_service.OnCustomCommand();
        }

Usage Example

示例#1
0
 private void SignalShutdownPending()
 {
     m_logger.Info("Preshutdown Event received");
     //DateTime end = DateTime.Now.AddMinutes(5);
     //while (end.Ticks > DateTime.Now.Ticks) //delay shutdown to n minutes, testing only
     while (m_serviceThreadObj.OnCustomCommand())
     {
         if (Abstractions.WindowsApi.pInvokes.ShutdownPending(this.ServiceHandle, ref myServiceStatus, new TimeSpan(0, 0, 500)))
         {
             //m_logger.Info("RequestAdditionalTime suceeded");
         }
         Thread.Sleep(250);
     }
     m_logger.Info("RequestAdditionalTime finished");
     this.OnStop();
     Abstractions.WindowsApi.pInvokes.SetServiceStopped(this.ServiceHandle, ref myServiceStatus);
 }