resharper suggestions in common implementations

This commit is contained in:
Luke Pulverenti
2013-04-10 11:45:15 -04:00
parent 7806ccd42f
commit d8263c7057
11 changed files with 52 additions and 63 deletions

View File

@@ -56,7 +56,17 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
/// <param name="taskManager">The task manager.</param>
/// <param name="jsonSerializer">The json serializer.</param>
/// <param name="logger">The logger.</param>
/// <param name="serverManager">The server manager.</param>
/// <exception cref="System.ArgumentNullException">
/// scheduledTask
/// or
/// applicationPaths
/// or
/// taskManager
/// or
/// jsonSerializer
/// or
/// logger
/// </exception>
public ScheduledTaskWorker(IScheduledTask scheduledTask, IApplicationPaths applicationPaths, ITaskManager taskManager, IJsonSerializer jsonSerializer, ILogger logger)
{
if (scheduledTask == null)
@@ -217,7 +227,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
{
get
{
LazyInitializer.EnsureInitialized(ref _triggers, ref _triggersInitialized, ref _triggersSyncLock, () => LoadTriggers());
LazyInitializer.EnsureInitialized(ref _triggers, ref _triggersInitialized, ref _triggersSyncLock, LoadTriggers);
return _triggers;
}

View File

@@ -1,6 +1,5 @@
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.ScheduledTasks;
using MediaBrowser.Model.Logging;
using System;
using System.Collections.Generic;
using System.IO;
@@ -20,21 +19,14 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
/// </summary>
/// <value>The application paths.</value>
private IApplicationPaths ApplicationPaths { get; set; }
/// <summary>
/// Gets or sets the logger.
/// </summary>
/// <value>The logger.</value>
private ILogger Logger { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="DeleteCacheFileTask" /> class.
/// </summary>
/// <param name="appPaths">The app paths.</param>
/// <param name="logger">The logger.</param>
public DeleteCacheFileTask(IApplicationPaths appPaths, ILogger logger)
public DeleteCacheFileTask(IApplicationPaths appPaths)
{
ApplicationPaths = appPaths;
Logger = logger;
}
/// <summary>

View File

@@ -1,6 +1,5 @@
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.ScheduledTasks;
using MediaBrowser.Model.Logging;
using System;
using System.Collections.Generic;
using System.IO;
@@ -20,21 +19,14 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
/// </summary>
/// <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>
/// Initializes a new instance of the <see cref="DeleteLogFileTask" /> class.
/// </summary>
/// <param name="configurationManager">The configuration manager.</param>
/// <param name="logger">The logger.</param>
public DeleteLogFileTask(IConfigurationManager configurationManager, ILogger logger)
public DeleteLogFileTask(IConfigurationManager configurationManager)
{
ConfigurationManager = configurationManager;
Logger = logger;
}
/// <summary>

View File

@@ -19,11 +19,6 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
/// <value>The log manager.</value>
private ILogManager LogManager { get; set; }
/// <summary>
/// Gets or sets the logger.
/// </summary>
/// <value>The logger.</value>
private ILogger Logger { get; set; }
/// <summary>
/// Gets or sets the configuration manager.
/// </summary>
/// <value>The configuration manager.</value>
@@ -33,12 +28,10 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
/// Initializes a new instance of the <see cref="ReloadLoggerFileTask" /> class.
/// </summary>
/// <param name="logManager">The logManager.</param>
/// <param name="logger">The logger.</param>
/// <param name="configurationManager">The configuration manager.</param>
public ReloadLoggerFileTask(ILogManager logManager, ILogger logger, IConfigurationManager configurationManager)
public ReloadLoggerFileTask(ILogManager logManager, IConfigurationManager configurationManager)
{
LogManager = logManager;
Logger = logger;
ConfigurationManager = configurationManager;
}