ArgusTV.Recorder.MediaPortalTvServer.TvServerPlugin.OnPowerEvent C# (CSharp) Метод

OnPowerEvent() приватный Метод

private OnPowerEvent ( PowerEventType powerStatus ) : bool
powerStatus PowerEventType
Результат bool
        private bool OnPowerEvent(PowerEventType powerStatus)
        {
            lock (this)
            {
                switch (powerStatus)
                {
                    case PowerEventType.QuerySuspend:
                    case PowerEventType.QueryStandBy:
                        return true;

                    case PowerEventType.Suspend:
                    case PowerEventType.StandBy:
                        Log.Debug("ArgusTV.Recorder.MediaPortalTvServer: System is entering standby");
                        _tvServerNeedsRestart = true;
                        return true;

                    case PowerEventType.QuerySuspendFailed:
                    case PowerEventType.QueryStandByFailed:
                        Log.Debug("ArgusTV.Recorder.MediaPortalTvServer: Entering standby was denied");
                        return true;

                    case PowerEventType.ResumeAutomatic:
                        Log.Debug("ArgusTV.Recorder.MediaPortalTvServer: System has resumed automatically from standby");
                        Resume();
                        return true;

                    case PowerEventType.ResumeCritical:
                        Log.Debug("ArgusTV.Recorder.MediaPortalTvServer: System has resumed from standby after a critical suspend");
                        Resume();
                        return true;

                    case PowerEventType.ResumeSuspend:
                        Log.Debug("ArgusTV.Recorder.MediaPortalTvServer: System has resumed from standby");
                        Resume();
                        return true;
                }
                return true;
            }
        }