CoreAppHost.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System.Collections.Generic;
  2. using System.Reflection;
  3. using Emby.Server.Implementations;
  4. using MediaBrowser.Common.Net;
  5. using MediaBrowser.Controller.Drawing;
  6. using MediaBrowser.Model.IO;
  7. using Microsoft.Extensions.Logging;
  8. namespace Jellyfin.Server
  9. {
  10. /// <summary>
  11. /// Implementation of the abstract <see cref="ApplicationHost" /> class.
  12. /// </summary>
  13. public class CoreAppHost : ApplicationHost
  14. {
  15. /// <summary>
  16. /// Initializes a new instance of the <see cref="CoreAppHost" /> class.
  17. /// </summary>
  18. /// <param name="applicationPaths">The <see cref="ServerApplicationPaths" /> to be used by the <see cref="CoreAppHost" />.</param>
  19. /// <param name="loggerFactory">The <see cref="ILoggerFactory" /> to be used by the <see cref="CoreAppHost" />.</param>
  20. /// <param name="options">The <see cref="StartupOptions" /> to be used by the <see cref="CoreAppHost" />.</param>
  21. /// <param name="fileSystem">The <see cref="IFileSystem" /> to be used by the <see cref="CoreAppHost" />.</param>
  22. /// <param name="networkManager">The <see cref="INetworkManager" /> to be used by the <see cref="CoreAppHost" />.</param>
  23. public CoreAppHost(
  24. ServerApplicationPaths applicationPaths,
  25. ILoggerFactory loggerFactory,
  26. StartupOptions options,
  27. IFileSystem fileSystem,
  28. INetworkManager networkManager)
  29. : base(
  30. applicationPaths,
  31. loggerFactory,
  32. options,
  33. fileSystem,
  34. networkManager)
  35. {
  36. }
  37. /// <inheritdoc />
  38. protected override void RestartInternal() => Program.Restart();
  39. /// <inheritdoc />
  40. protected override IEnumerable<Assembly> GetAssembliesWithPartsInternal()
  41. {
  42. yield return typeof(CoreAppHost).Assembly;
  43. }
  44. /// <inheritdoc />
  45. protected override void ShutdownInternal() => Program.Shutdown();
  46. }
  47. }