Created IConfigurationManager

This commit is contained in:
LukePulverenti
2013-03-04 00:43:06 -05:00
parent 401b56c732
commit 2ca4b7d03a
106 changed files with 1343 additions and 2437 deletions

View File

@@ -1,4 +1,5 @@
using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.ScheduledTasks;
using MediaBrowser.Model.Logging;
using System;
@@ -19,27 +20,35 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
private readonly IApplicationHost _appHost;
/// <summary>
/// Gets or sets the kernel.
/// Gets or sets the configuration manager.
/// </summary>
/// <value>The kernel.</value>
private IKernel Kernel { get; set; }
/// <value>The configuration manager.</value>
private IConfigurationManager ConfigurationManager { get; set; }
/// <summary>
/// Gets or sets the logger.
/// </summary>
/// <value>The logger.</value>
private ILogger Logger { get; set; }
/// <summary>
/// Gets or sets the kernel.
/// </summary>
/// <value>The kernel.</value>
private IKernel Kernel { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="SystemUpdateTask" /> class.
/// </summary>
/// <param name="appHost">The app host.</param>
/// <param name="kernel">The kernel.</param>
/// <param name="configurationManager">The configuration manager.</param>
/// <param name="logger">The logger.</param>
public SystemUpdateTask(IApplicationHost appHost, IKernel kernel, ILogger logger)
/// <param name="kernel">The kernel.</param>
public SystemUpdateTask(IApplicationHost appHost, IConfigurationManager configurationManager, ILogger logger, IKernel kernel)
{
_appHost = appHost;
Kernel = kernel;
ConfigurationManager = configurationManager;
Logger = logger;
Kernel = kernel;
}
/// <summary>
@@ -88,7 +97,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
cancellationToken.ThrowIfCancellationRequested();
if (Kernel.Configuration.EnableAutoUpdate)
if (ConfigurationManager.CommonConfiguration.EnableAutoUpdate)
{
Logger.Info("Update Revision {0} available. Updating...", updateInfo.AvailableVersion);