diff --git a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs
index 811f3e92a..68e94fe26 100644
--- a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs
+++ b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs
@@ -1,19 +1,11 @@
-<<<<<<< HEAD
-using MediaBrowser.Common.IO;
-using MediaBrowser.Common.Implementations.HttpServer;
-using MediaBrowser.Common.Implementations.Udp;
+using MediaBrowser.Common.Implementations.Udp;
+using MediaBrowser.Common.Implementations.Updates;
using MediaBrowser.Common.Implementations.WebSocket;
using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.Net;
using MediaBrowser.Common.ScheduledTasks;
-using MediaBrowser.Model.IO;
-=======
-using MediaBrowser.Common.Implementations.Updates;
-using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.Updates;
->>>>>>> c9f48fe0d0d5cf4aec62df1d1e97f629967aff6f
using MediaBrowser.Model.Logging;
-using MediaBrowser.Model.MediaInfo;
using MediaBrowser.Model.Serialization;
using SimpleInjector;
using System;
@@ -50,11 +42,6 @@ namespace MediaBrowser.Common.Implementations
///
protected readonly Container Container = new Container();
- ///
- /// The package manager
- ///
- protected readonly IPackageManager PackageManager = new PackageManager();
-
///
/// Gets assemblies that failed to load
///
@@ -187,6 +174,7 @@ namespace MediaBrowser.Common.Implementations
RegisterSingleInstance(() => new AlchemyServer(Logger));
RegisterSingleInstance(ProtobufSerializer);
RegisterSingleInstance(new UdpServer(Logger), false);
+ RegisterSingleInstance(new PackageManager());
RegisterSingleInstance(networkManager);
RegisterSingleInstance(serverManager);
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs
index 673639ff7..12e178920 100644
--- a/MediaBrowser.ServerApplication/ApplicationHost.cs
+++ b/MediaBrowser.ServerApplication/ApplicationHost.cs
@@ -7,15 +7,12 @@ using MediaBrowser.Common.Implementations.Logging;
using MediaBrowser.Common.Implementations.NetworkManagement;
using MediaBrowser.Common.Implementations.ScheduledTasks;
using MediaBrowser.Common.Implementations.Serialization;
-using MediaBrowser.Common.IO;
using MediaBrowser.Common.Implementations.ServerManager;
using MediaBrowser.Common.Implementations.Udp;
-using MediaBrowser.Common.Implementations.Updates;
-using MediaBrowser.Common.Implementations.WebSocket;
+using MediaBrowser.Common.IO;
using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.Net;
using MediaBrowser.Common.ScheduledTasks;
-using MediaBrowser.Common.Updates;
using MediaBrowser.Controller;
using MediaBrowser.IsoMounter;
using MediaBrowser.Model.IO;
@@ -88,13 +85,7 @@ namespace MediaBrowser.ServerApplication
RegisterResources(taskManager, networkManager, serverManager);
-<<<<<<< HEAD
FindParts();
-=======
- RegisterResources(taskManager, httpServer, networkManager, serverManager, PackageManager);
-
- FindParts(taskManager, httpServer);
->>>>>>> c9f48fe0d0d5cf4aec62df1d1e97f629967aff6f
}
///
@@ -118,11 +109,7 @@ namespace MediaBrowser.ServerApplication
///
/// Registers resources that classes will depend on
///
-<<<<<<< HEAD
protected override void RegisterResources(ITaskManager taskManager, INetworkManager networkManager, IServerManager serverManager)
-=======
- private void RegisterResources(ITaskManager taskManager, IHttpServer httpServer, INetworkManager networkManager, IServerManager serverManager, IPackageManager packageManager)
->>>>>>> c9f48fe0d0d5cf4aec62df1d1e97f629967aff6f
{
base.RegisterResources(taskManager, networkManager, serverManager);
@@ -138,27 +125,23 @@ namespace MediaBrowser.ServerApplication
RegisterSingleInstance(new DotNetZipClient());
RegisterSingleInstance(_jsonSerializer);
RegisterSingleInstance(_xmlSerializer);
-<<<<<<< HEAD
RegisterSingleInstance(ServerFactory.CreateServer(this, ProtobufSerializer, Logger, "Media Browser", "index.html"), false);
-=======
RegisterSingleInstance(ProtobufSerializer);
RegisterSingleInstance(new UdpServer(Logger), false);
- RegisterSingleInstance(httpServer, false);
RegisterSingleInstance(networkManager);
RegisterSingleInstance(serverManager);
- RegisterSingleInstance(packageManager);
}
///
/// Finds the parts.
///
- private void FindParts(ITaskManager taskManager, IHttpServer httpServer)
+ protected override void FindParts()
{
- taskManager.AddTasks(GetExports(false));
+ Resolve().AddTasks(GetExports(false));
- httpServer.Init(GetExports(false));
->>>>>>> c9f48fe0d0d5cf4aec62df1d1e97f629967aff6f
+ Resolve().Init(GetExports(false));
+ Resolve().AddWebSocketListeners(GetExports(false));
}
///
@@ -186,6 +169,7 @@ namespace MediaBrowser.ServerApplication
/// Task{CheckForUpdateResult}.
public Task CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress progress)
{
+ // Get package manager using Resolve()
return new ApplicationUpdateCheck().CheckForApplicationUpdate(cancellationToken, progress);
}