2016-10-26 08:01:42 +02:00
|
|
|
|
using MediaBrowser.Common.Net;
|
|
|
|
|
using MediaBrowser.Controller;
|
2015-06-13 06:14:48 +02:00
|
|
|
|
using MediaBrowser.Controller.Configuration;
|
2013-12-07 16:52:38 +01:00
|
|
|
|
using MediaBrowser.Controller.Net;
|
2016-10-23 21:14:57 +02:00
|
|
|
|
using MediaBrowser.Model.IO;
|
2013-02-24 22:53:54 +01:00
|
|
|
|
using MediaBrowser.Model.Logging;
|
2013-12-09 03:24:48 +01:00
|
|
|
|
using ServiceStack.Logging;
|
2013-02-24 22:53:54 +01:00
|
|
|
|
|
2013-03-07 06:34:00 +01:00
|
|
|
|
namespace MediaBrowser.Server.Implementations.HttpServer
|
2013-02-24 22:53:54 +01:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class ServerFactory
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static class ServerFactory
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates the server.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>IHttpServer.</returns>
|
2016-10-26 08:01:42 +02:00
|
|
|
|
public static IHttpServer CreateServer(IServerApplicationHost applicationHost,
|
2015-06-13 06:14:48 +02:00
|
|
|
|
ILogManager logManager,
|
|
|
|
|
IServerConfigurationManager config,
|
2016-10-26 08:01:42 +02:00
|
|
|
|
INetworkManager networkmanager,
|
2016-10-06 20:55:01 +02:00
|
|
|
|
IMemoryStreamProvider streamProvider,
|
2014-10-07 01:58:46 +02:00
|
|
|
|
string serverName,
|
2015-01-18 20:53:34 +01:00
|
|
|
|
string defaultRedirectpath)
|
2013-02-24 22:53:54 +01:00
|
|
|
|
{
|
2013-12-09 03:24:48 +01:00
|
|
|
|
LogManager.LogFactory = new ServerLogFactory(logManager);
|
2014-10-07 01:58:46 +02:00
|
|
|
|
|
2016-10-26 08:01:42 +02:00
|
|
|
|
return new HttpListenerHost(applicationHost, logManager, config, serverName, defaultRedirectpath, networkmanager, streamProvider);
|
2013-02-24 22:53:54 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|