ServerEntryPoint.cs 1006 B

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