You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
600 B
23 lines
600 B
11 years ago
|
using System.Threading;
|
||
|
using NLog;
|
||
|
using NzbDrone.Core.Instrumentation;
|
||
|
|
||
|
namespace NzbDrone.Core.Messaging.Commands
|
||
|
{
|
||
|
public class TestCommandExecutor : IExecute<TestCommand>
|
||
|
{
|
||
|
private readonly Logger _logger;
|
||
|
|
||
|
public TestCommandExecutor(Logger logger)
|
||
|
{
|
||
|
_logger = logger;
|
||
|
}
|
||
|
|
||
|
public void Execute(TestCommand message)
|
||
|
{
|
||
|
_logger.ProgressInfo("Starting Test command. duration {0}", message.Duration);
|
||
|
Thread.Sleep(message.Duration);
|
||
|
_logger.ProgressInfo("Completed Test command");
|
||
|
}
|
||
|
}
|
||
|
}
|