jellyfin-server/MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs
2016-10-26 02:01:42 -04:00

34 lines
1.1 KiB
C#

using MediaBrowser.Common.Net;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Net;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
using ServiceStack.Logging;
namespace MediaBrowser.Server.Implementations.HttpServer
{
/// <summary>
/// Class ServerFactory
/// </summary>
public static class ServerFactory
{
/// <summary>
/// Creates the server.
/// </summary>
/// <returns>IHttpServer.</returns>
public static IHttpServer CreateServer(IServerApplicationHost applicationHost,
ILogManager logManager,
IServerConfigurationManager config,
INetworkManager networkmanager,
IMemoryStreamProvider streamProvider,
string serverName,
string defaultRedirectpath)
{
LogManager.LogFactory = new ServerLogFactory(logManager);
return new HttpListenerHost(applicationHost, logManager, config, serverName, defaultRedirectpath, networkmanager, streamProvider);
}
}
}