ServerEntryPoint.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma warning disable CS1591
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using MediaBrowser.Common;
  6. using MediaBrowser.Controller.Plugins;
  7. namespace MediaBrowser.WebDashboard
  8. {
  9. public sealed class ServerEntryPoint : IServerEntryPoint
  10. {
  11. private readonly IApplicationHost _appHost;
  12. public ServerEntryPoint(IApplicationHost appHost)
  13. {
  14. _appHost = appHost;
  15. Instance = this;
  16. }
  17. public static ServerEntryPoint Instance { get; private set; }
  18. /// <summary>
  19. /// Gets the list of plugin configuration pages.
  20. /// </summary>
  21. /// <value>The configuration pages.</value>
  22. public List<IPluginConfigurationPage> PluginConfigurationPages { get; private set; }
  23. /// <inheritdoc />
  24. public Task RunAsync()
  25. {
  26. PluginConfigurationPages = _appHost.GetExports<IPluginConfigurationPage>().ToList();
  27. return Task.CompletedTask;
  28. }
  29. /// <inheritdoc />
  30. public void Dispose()
  31. {
  32. }
  33. }
  34. }