1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-19 10:54:05 +02:00
Sonarr/NzbDrone.Core/Messaging/MessageExtensions.cs

18 lines
479 B
C#
Raw Normal View History

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