* Stylecop Rules and Fixes
This commit is contained in:
Qstick
2020-01-03 07:49:24 -05:00
committed by GitHub
parent 63d669178d
commit f77a2feeef
1307 changed files with 8704 additions and 7404 deletions
@@ -7,16 +7,18 @@ using NLog;
using NzbDrone.Common;
using NzbDrone.Common.EnsureThat;
using NzbDrone.Common.Serializer;
using NzbDrone.Core.Lifecycle;
using NzbDrone.Core.Exceptions;
using NzbDrone.Core.Lifecycle;
using NzbDrone.Core.Messaging.Events;
namespace NzbDrone.Core.Messaging.Commands
{
public interface IManageCommandQueue
{
List<CommandModel> PushMany<TCommand>(List<TCommand> commands) where TCommand : Command;
CommandModel Push<TCommand>(TCommand command, CommandPriority priority = CommandPriority.Normal, CommandTrigger trigger = CommandTrigger.Unspecified) where TCommand : Command;
List<CommandModel> PushMany<TCommand>(List<TCommand> commands)
where TCommand : Command;
CommandModel Push<TCommand>(TCommand command, CommandPriority priority = CommandPriority.Normal, CommandTrigger trigger = CommandTrigger.Unspecified)
where TCommand : Command;
CommandModel Push(string commandName, DateTime? lastExecutionTime, CommandPriority priority = CommandPriority.Normal, CommandTrigger trigger = CommandTrigger.Unspecified);
IEnumerable<CommandModel> Queue(CancellationToken cancellationToken);
List<CommandModel> All();
@@ -50,7 +52,8 @@ namespace NzbDrone.Core.Messaging.Commands
_commandQueue = new CommandQueue();
}
public List<CommandModel> PushMany<TCommand>(List<TCommand> commands) where TCommand : Command
public List<CommandModel> PushMany<TCommand>(List<TCommand> commands)
where TCommand : Command
{
_logger.Trace("Publishing {0} commands", commands.Count);
@@ -67,7 +70,6 @@ namespace NzbDrone.Core.Messaging.Commands
}
var commandModel = new CommandModel
{
Name = command.Name,
Body = command,
@@ -90,8 +92,8 @@ namespace NzbDrone.Core.Messaging.Commands
return commandModels;
}
public CommandModel Push<TCommand>(TCommand command, CommandPriority priority = CommandPriority.Normal, CommandTrigger trigger = CommandTrigger.Unspecified) where TCommand : Command
public CommandModel Push<TCommand>(TCommand command, CommandPriority priority = CommandPriority.Normal, CommandTrigger trigger = CommandTrigger.Unspecified)
where TCommand : Command
{
Ensure.That(command, () => command).IsNotNull();