aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.WebDashboard/ServerEntryPoint.cs
blob: 5c7e8b3c764c4691540504e381a7527ac1767cc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma warning disable CS1591

using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MediaBrowser.Common;
using MediaBrowser.Controller.Plugins;

namespace MediaBrowser.WebDashboard
{
    public sealed class ServerEntryPoint : IServerEntryPoint
    {
        private readonly IApplicationHost _appHost;

        public ServerEntryPoint(IApplicationHost appHost)
        {
            _appHost = appHost;
            Instance = this;
        }

        public static ServerEntryPoint Instance { get; private set; }

        /// <summary>
        /// Gets the list of plugin configuration pages.
        /// </summary>
        /// <value>The configuration pages.</value>
        public List<IPluginConfigurationPage> PluginConfigurationPages { get; private set; }

        /// <inheritdoc />
        public Task RunAsync()
        {
            PluginConfigurationPages = _appHost.GetExports<IPluginConfigurationPage>().ToList();

            return Task.CompletedTask;
        }

        /// <inheritdoc />
        public void Dispose()
        {
        }
    }
}