mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-21 01:49:57 +02:00
18 lines
479 B
C#
18 lines
479 B
C#
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);
|
|
}
|
|
}
|
|
} |