OnCustomCommand() 공개 메소드

public OnCustomCommand ( ) : System.Boolean
리턴 System.Boolean
예제 #1
0
파일: ServiceHost.cs 프로젝트: momiji/pgina
 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);
 }