move installation manager down to common

This commit is contained in:
Luke Pulverenti 2013-06-30 22:27:50 -04:00
parent a2a6e6ae1a
commit a5f97dcaa8
13 changed files with 24 additions and 22 deletions

View File

@ -1,6 +1,6 @@
using MediaBrowser.Common;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Controller.Updates;
using MediaBrowser.Common.Updates;
using MediaBrowser.Model.Updates;
using ServiceStack.ServiceHost;
using System;

View File

@ -1,7 +1,7 @@
using MediaBrowser.Common;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Security;
using MediaBrowser.Controller.Updates;
using MediaBrowser.Common.Updates;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;

View File

@ -148,6 +148,12 @@ namespace MediaBrowser.Common.Implementations
/// <value>The configuration manager.</value>
protected IConfigurationManager ConfigurationManager { get; private set; }
/// <summary>
/// Gets or sets the installation manager.
/// </summary>
/// <value>The installation manager.</value>
protected IInstallationManager InstallationManager { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="BaseApplicationHost{TApplicationPathsType}"/> class.
/// </summary>
@ -282,6 +288,9 @@ namespace MediaBrowser.Common.Implementations
PackageManager = new PackageManager(SecurityManager, NetworkManager, HttpClient, ApplicationPaths, JsonSerializer, Logger);
RegisterSingleInstance(PackageManager);
InstallationManager = new InstallationManager(HttpClient, PackageManager, JsonSerializer, Logger, this);
RegisterSingleInstance(InstallationManager);
});
}

View File

@ -85,6 +85,7 @@
<Compile Include="Serialization\JsonSerializer.cs" />
<Compile Include="Serialization\XmlSerializer.cs" />
<Compile Include="Updates\ApplicationUpdater.cs" />
<Compile Include="Updates\InstallationManager.cs" />
<Compile Include="Updates\PackageManager.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -1,10 +1,8 @@
using MediaBrowser.Common;
using MediaBrowser.Common.Events;
using MediaBrowser.Common.Events;
using MediaBrowser.Common.Net;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.Progress;
using MediaBrowser.Common.Updates;
using MediaBrowser.Controller.Updates;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Updates;
@ -16,7 +14,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Server.Implementations.Updates
namespace MediaBrowser.Common.Implementations.Updates
{
/// <summary>
/// Manages all install, uninstall and update operations (both plugins and system)

View File

@ -106,6 +106,7 @@
<Compile Include="ScheduledTasks\WeeklyTrigger.cs" />
<Compile Include="Security\IRequiresRegistration.cs" />
<Compile Include="Security\ISecurityManager.cs" />
<Compile Include="Updates\IInstallationManager.cs" />
<Compile Include="Updates\IPackageManager.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Updates
namespace MediaBrowser.Common.Updates
{
public interface IInstallationManager : IDisposable
{

View File

@ -160,7 +160,6 @@
<Compile Include="Session\SessionInfo.cs" />
<Compile Include="Sorting\IBaseItemComparer.cs" />
<Compile Include="Sorting\IUserBaseItemComparer.cs" />
<Compile Include="Updates\IInstallationManager.cs" />
<Compile Include="Providers\BaseItemXmlParser.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -156,7 +156,7 @@ namespace MediaBrowser.Providers.Savers
builder.Append("<certification>" + SecurityElement.Escape(item.OfficialRating) + "</certification>");
}
builder.Append("<Added>" + SecurityElement.Escape(item.DateCreated.ToString(UsCulture)) + "</Added>");
builder.Append("<Added>" + SecurityElement.Escape(item.DateCreated.ToString("G")) + "</Added>");
builder.Append("<LockData>" + item.DontFetchMeta.ToString().ToLower() + "</LockData>");

View File

@ -184,7 +184,6 @@
<Compile Include="Persistence\SqliteUserRepository.cs" />
<Compile Include="Udp\UdpMessageReceivedEventArgs.cs" />
<Compile Include="Udp\UdpServer.cs" />
<Compile Include="Updates\InstallationManager.cs" />
<Compile Include="WebSocket\AlchemyServer.cs" />
<Compile Include="WebSocket\AlchemyWebSocket.cs" />
</ItemGroup>
@ -286,6 +285,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="Updates\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@ -1,6 +1,6 @@
using MediaBrowser.Common.ScheduledTasks;
using MediaBrowser.Common.Updates;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Updates;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Net;
using System;

View File

@ -6,8 +6,10 @@ using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Implementations;
using MediaBrowser.Common.Implementations.ScheduledTasks;
using MediaBrowser.Common.IO;
using MediaBrowser.Common.Implementations.Updates;
using MediaBrowser.Common.MediaInfo;
using MediaBrowser.Common.Net;
using MediaBrowser.Common.Updates;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Drawing;
@ -22,7 +24,6 @@ using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Resolvers;
using MediaBrowser.Controller.Session;
using MediaBrowser.Controller.Sorting;
using MediaBrowser.Controller.Updates;
using MediaBrowser.IsoMounter;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.MediaInfo;
@ -41,7 +42,6 @@ using MediaBrowser.Server.Implementations.Persistence;
using MediaBrowser.Server.Implementations.Providers;
using MediaBrowser.Server.Implementations.ServerManager;
using MediaBrowser.Server.Implementations.Session;
using MediaBrowser.Server.Implementations.Updates;
using MediaBrowser.Server.Implementations.WebSocket;
using MediaBrowser.ServerApplication.Implementations;
using MediaBrowser.WebDashboard.Api;
@ -118,11 +118,6 @@ namespace MediaBrowser.ServerApplication
return new ServerConfigurationManager(ApplicationPaths, LogManager, XmlSerializer);
}
/// <summary>
/// Gets or sets the installation manager.
/// </summary>
/// <value>The installation manager.</value>
private IInstallationManager InstallationManager { get; set; }
/// <summary>
/// Gets or sets the server manager.
/// </summary>
@ -265,9 +260,6 @@ namespace MediaBrowser.ServerApplication
LibraryManager = new LibraryManager(Logger, TaskManager, UserManager, ServerConfigurationManager, UserDataRepository, () => DirectoryWatchers);
RegisterSingleInstance(LibraryManager);
InstallationManager = new InstallationManager(HttpClient, PackageManager, JsonSerializer, Logger, this);
RegisterSingleInstance(InstallationManager);
DirectoryWatchers = new DirectoryWatchers(LogManager, TaskManager, LibraryManager, ServerConfigurationManager);
RegisterSingleInstance(DirectoryWatchers);

View File

@ -2,12 +2,12 @@
using MediaBrowser.Common.Net;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.ScheduledTasks;
using MediaBrowser.Common.Updates;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Controller.Updates;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Tasks;
using MediaBrowser.Model.Updates;