mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-26 17:57:43 +00:00
17 lines
No EOL
445 B
C#
17 lines
No EOL
445 B
C#
using System;
|
|
|
|
namespace NzbDrone.Common.Messaging
|
|
{
|
|
public static class MessageExtensions
|
|
{
|
|
public static string GetExecutorName(this Type commandType)
|
|
{
|
|
if (!typeof(ICommand).IsAssignableFrom(commandType))
|
|
{
|
|
throw new ArgumentException("commandType must implement ICommand");
|
|
}
|
|
|
|
return string.Format("I{0}Executor", commandType.Name);
|
|
}
|
|
}
|
|
} |