BackgroundService.cs 726 B

123456789101112131415161718192021222324252627282930
  1. using System.ServiceProcess;
  2. namespace MediaBrowser.ServerApplication
  3. {
  4. public class BackgroundService : ServiceBase
  5. {
  6. public BackgroundService()
  7. {
  8. CanPauseAndContinue = false;
  9. CanHandleSessionChangeEvent = true;
  10. CanStop = false;
  11. CanShutdown = true;
  12. ServiceName = "Media Browser";
  13. }
  14. protected override void OnSessionChange(SessionChangeDescription changeDescription)
  15. {
  16. base.OnSessionChange(changeDescription);
  17. }
  18. protected override void OnStart(string[] args)
  19. {
  20. }
  21. protected override void OnShutdown()
  22. {
  23. base.OnShutdown();
  24. }
  25. }
  26. }