NativeApp.cs 995 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using MediaBrowser.Server.Startup.Common;
  3. using MediaBrowser.Model.Logging;
  4. namespace MediaBrowser.Server.Mac
  5. {
  6. /// <summary>
  7. /// Class NativeApp
  8. /// </summary>
  9. public class NativeApp : BaseMonoApp
  10. {
  11. public NativeApp(ILogger logger)
  12. : base(logger)
  13. {
  14. }
  15. /// <summary>
  16. /// Shutdowns this instance.
  17. /// </summary>
  18. public override void Shutdown()
  19. {
  20. MainClass.Shutdown();
  21. }
  22. /// <summary>
  23. /// Determines whether this instance [can self restart].
  24. /// </summary>
  25. /// <value><c>true</c> if this instance can self restart; otherwise, <c>false</c>.</value>
  26. public override bool CanSelfRestart
  27. {
  28. get
  29. {
  30. return true;
  31. }
  32. }
  33. /// <summary>
  34. /// Restarts this instance.
  35. /// </summary>
  36. public override void Restart(StartupOptions options)
  37. {
  38. MainClass.Restart();
  39. }
  40. }
  41. }