* 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
@@ -11,13 +11,14 @@ namespace NzbDrone.Core.Messaging.Commands
public class CommandExecutor : IHandle<ApplicationStartedEvent>,
IHandle<ApplicationShutdownRequested>
{
private const int THREAD_LIMIT = 3;
private readonly Logger _logger;
private readonly IServiceFactory _serviceFactory;
private readonly IManageCommandQueue _commandQueueManager;
private readonly IEventAggregator _eventAggregator;
private static CancellationTokenSource _cancellationTokenSource;
private const int THREAD_LIMIT = 3;
public CommandExecutor(IServiceFactory serviceFactory,
IManageCommandQueue commandQueueManager,
@@ -53,7 +54,7 @@ namespace NzbDrone.Core.Messaging.Commands
}
catch (OperationCanceledException)
{
_logger.Trace("Stopped one command execution pipeline");
_logger.Trace("Stopped one command execution pipeline");
}
catch (Exception ex)
{
@@ -61,7 +62,8 @@ namespace NzbDrone.Core.Messaging.Commands
}
}
private void ExecuteCommand<TCommand>(TCommand command, CommandModel commandModel) where TCommand : Command
private void ExecuteCommand<TCommand>(TCommand command, CommandModel commandModel)
where TCommand : Command
{
var handlerContract = typeof(IExecute<>).MakeGenericType(command.GetType());
var handler = (IExecute<TCommand>)_serviceFactory.Build(handlerContract);