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.
18 lines
479 B
18 lines
479 B
12 years ago
|
using System;
|
||
|
using NzbDrone.Core.Messaging.Commands;
|
||
12 years ago
|
|
||
12 years ago
|
namespace NzbDrone.Core.Messaging
|
||
12 years ago
|
{
|
||
|
public static class MessageExtensions
|
||
|
{
|
||
|
public static string GetExecutorName(this Type commandType)
|
||
|
{
|
||
12 years ago
|
if (!typeof(Command).IsAssignableFrom(commandType))
|
||
12 years ago
|
{
|
||
12 years ago
|
throw new ArgumentException("commandType must implement ICommand");
|
||
12 years ago
|
}
|
||
|
|
||
|
return string.Format("I{0}Executor", commandType.Name);
|
||
|
}
|
||
|
}
|
||
|
}
|