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.
Lidarr/NzbDrone.Core/Messaging/MessageExtensions.cs

18 lines
479 B

using System;
using NzbDrone.Core.Messaging.Commands;
namespace NzbDrone.Core.Messaging
{
public static class MessageExtensions
{
public static string GetExecutorName(this Type commandType)
{
if (!typeof(Command).IsAssignableFrom(commandType))
{
throw new ArgumentException("commandType must implement ICommand");
}
return string.Format("I{0}Executor", commandType.Name);
}
}
}