jellyfin-server/MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs

38 lines
1.4 KiB
C#
Raw Normal View History

2013-03-07 05:34:00 +00:00
using MediaBrowser.Common;
2015-12-14 14:45:42 +00:00
using MediaBrowser.Common.Net;
2015-06-13 04:14:48 +00:00
using MediaBrowser.Controller.Configuration;
2013-12-07 15:52:38 +00:00
using MediaBrowser.Controller.Net;
2013-02-24 21:53:54 +00:00
using MediaBrowser.Model.Logging;
2013-12-09 02:24:48 +00:00
using ServiceStack.Logging;
2013-02-24 21:53:54 +00:00
2013-03-07 05:34:00 +00:00
namespace MediaBrowser.Server.Implementations.HttpServer
2013-02-24 21:53:54 +00:00
{
/// <summary>
/// Class ServerFactory
/// </summary>
public static class ServerFactory
{
/// <summary>
/// Creates the server.
/// </summary>
/// <param name="applicationHost">The application host.</param>
2013-04-17 19:16:36 +00:00
/// <param name="logManager">The log manager.</param>
2015-06-13 04:14:48 +00:00
/// <param name="config">The configuration.</param>
2015-12-14 14:45:42 +00:00
/// <param name="_networkmanager">The _networkmanager.</param>
2013-02-24 21:53:54 +00:00
/// <param name="serverName">Name of the server.</param>
/// <param name="defaultRedirectpath">The default redirectpath.</param>
/// <returns>IHttpServer.</returns>
2015-06-13 04:14:48 +00:00
public static IHttpServer CreateServer(IApplicationHost applicationHost,
ILogManager logManager,
IServerConfigurationManager config,
2015-12-14 14:45:42 +00:00
INetworkManager _networkmanager,
2014-10-06 23:58:46 +00:00
string serverName,
2015-01-18 19:53:34 +00:00
string defaultRedirectpath)
2013-02-24 21:53:54 +00:00
{
2013-12-09 02:24:48 +00:00
LogManager.LogFactory = new ServerLogFactory(logManager);
2014-10-06 23:58:46 +00:00
2015-12-14 14:45:42 +00:00
return new HttpListenerHost(applicationHost, logManager, config, serverName, defaultRedirectpath, _networkmanager);
2013-02-24 21:53:54 +00:00
}
}
}