From 0c8d924bfc64f91b7883507ebdfdc664a8495465 Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Tue, 26 Feb 2013 15:21:43 -0500 Subject: Extract IInstallationManager interface first step to moving update logic to common --- MediaBrowser.Controller/Kernel.cs | 3 ++- MediaBrowser.Controller/Updates/InstallationManager.cs | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/Kernel.cs b/MediaBrowser.Controller/Kernel.cs index 7cb838e44..a4af76805 100644 --- a/MediaBrowser.Controller/Kernel.cs +++ b/MediaBrowser.Controller/Kernel.cs @@ -1,6 +1,7 @@ using MediaBrowser.Common.Kernel; using MediaBrowser.Common.Plugins; using MediaBrowser.Common.ScheduledTasks; +using MediaBrowser.Common.Updates; using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.IO; @@ -70,7 +71,7 @@ namespace MediaBrowser.Controller /// Gets the installation manager. /// /// The installation manager. - public InstallationManager InstallationManager { get; private set; } + public IInstallationManager InstallationManager { get; private set; } /// /// Gets or sets the file system manager. diff --git a/MediaBrowser.Controller/Updates/InstallationManager.cs b/MediaBrowser.Controller/Updates/InstallationManager.cs index efef87f86..64b72ae63 100644 --- a/MediaBrowser.Controller/Updates/InstallationManager.cs +++ b/MediaBrowser.Controller/Updates/InstallationManager.cs @@ -3,6 +3,7 @@ using MediaBrowser.Common.Kernel; using MediaBrowser.Common.Net; using MediaBrowser.Common.Plugins; using MediaBrowser.Common.Progress; +using MediaBrowser.Common.Updates; using MediaBrowser.Model.IO; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Serialization; @@ -21,18 +22,18 @@ namespace MediaBrowser.Controller.Updates /// /// Manages all install, uninstall and update operations (both plugins and system) /// - public class InstallationManager : BaseManager + public class InstallationManager : BaseManager, IInstallationManager { /// /// The current installations /// - public readonly List> CurrentInstallations = - new List>(); + public List> CurrentInstallations { get; set; } + /// /// The completed installations /// - public readonly ConcurrentBag CompletedInstallations = new ConcurrentBag(); + public ConcurrentBag CompletedInstallations { get; set; } #region PluginUninstalled Event /// @@ -161,6 +162,8 @@ namespace MediaBrowser.Controller.Updates throw new ArgumentNullException("httpClient"); } + CurrentInstallations = new List>(); + CompletedInstallations = new ConcurrentBag(); JsonSerializer = jsonSerializer; HttpClient = httpClient; ApplicationHost = appHost; -- cgit v1.2.3