From 08d9004d8f361aaf13756cab70fc659e5fbb775c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 3 Jun 2013 14:15:35 -0400 Subject: a little more kernel consolidation --- .../ServerManager/ServerManager.cs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'MediaBrowser.Server.Implementations/ServerManager') diff --git a/MediaBrowser.Server.Implementations/ServerManager/ServerManager.cs b/MediaBrowser.Server.Implementations/ServerManager/ServerManager.cs index f8e47434e..80b6a0f7d 100644 --- a/MediaBrowser.Server.Implementations/ServerManager/ServerManager.cs +++ b/MediaBrowser.Server.Implementations/ServerManager/ServerManager.cs @@ -59,7 +59,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager /// /// The _application host /// - private readonly IApplicationHost _applicationHost; + private readonly IServerApplicationHost _applicationHost; /// /// Gets or sets the configuration manager. @@ -91,11 +91,6 @@ namespace MediaBrowser.Server.Implementations.ServerManager /// The web socket listeners. private readonly List _webSocketListeners = new List(); - /// - /// The _kernel - /// - private readonly Kernel _kernel; - /// /// Initializes a new instance of the class. /// @@ -103,9 +98,8 @@ namespace MediaBrowser.Server.Implementations.ServerManager /// The json serializer. /// The logger. /// The configuration manager. - /// The kernel. /// applicationHost - public ServerManager(IApplicationHost applicationHost, IJsonSerializer jsonSerializer, ILogger logger, IServerConfigurationManager configurationManager, Kernel kernel) + public ServerManager(IServerApplicationHost applicationHost, IJsonSerializer jsonSerializer, ILogger logger, IServerConfigurationManager configurationManager) { if (applicationHost == null) { @@ -124,7 +118,6 @@ namespace MediaBrowser.Server.Implementations.ServerManager _jsonSerializer = jsonSerializer; _applicationHost = applicationHost; ConfigurationManager = configurationManager; - _kernel = kernel; ConfigurationManager.ConfigurationUpdated += ConfigurationUpdated; } @@ -161,7 +154,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager private void ReloadHttpServer() { // Only reload if the port has changed, so that we don't disconnect any active users - if (HttpServer != null && HttpServer.UrlPrefix.Equals(_kernel.HttpServerUrlPrefix, StringComparison.OrdinalIgnoreCase)) + if (HttpServer != null && HttpServer.UrlPrefix.Equals(_applicationHost.HttpServerUrlPrefix, StringComparison.OrdinalIgnoreCase)) { return; } @@ -174,7 +167,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager { HttpServer = _applicationHost.Resolve(); HttpServer.EnableHttpRequestLogging = ConfigurationManager.Configuration.EnableHttpLevelLogging; - HttpServer.Start(_kernel.HttpServerUrlPrefix); + HttpServer.Start(_applicationHost.HttpServerUrlPrefix); } catch (HttpListenerException ex) { -- cgit v1.2.3