jellyfin-server/MediaBrowser.WebDashboard/ServerEntryPoint.cs

39 lines
1006 B
C#
Raw Normal View History

using System.Collections.Generic;
using System.Linq;
2019-01-27 14:40:37 +00:00
using System.Threading.Tasks;
2018-09-12 17:26:21 +00:00
using MediaBrowser.Common;
using MediaBrowser.Controller.Plugins;
namespace MediaBrowser.WebDashboard
{
public class ServerEntryPoint : IServerEntryPoint
{
/// <summary>
/// Gets the list of plugin configuration pages
/// </summary>
/// <value>The configuration pages.</value>
2016-10-26 06:01:42 +00:00
public List<IPluginConfigurationPage> PluginConfigurationPages { get; private set; }
private readonly IApplicationHost _appHost;
public static ServerEntryPoint Instance { get; private set; }
public ServerEntryPoint(IApplicationHost appHost)
{
_appHost = appHost;
Instance = this;
}
2019-01-27 14:40:37 +00:00
public Task RunAsync()
{
2016-10-26 06:01:42 +00:00
PluginConfigurationPages = _appHost.GetExports<IPluginConfigurationPage>().ToList();
2019-01-27 14:40:37 +00:00
return Task.CompletedTask;
}
public void Dispose()
{
}
}
}