fixed service registration for event handlers and executors.

This commit is contained in:
kay.one 2013-05-07 22:47:15 -07:00
commit fa8f67d7fe
12 changed files with 190 additions and 95 deletions

View file

@ -0,0 +1,17 @@
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 IExecute");
}
return string.Format("I{0}Executor", commandType.Name);
}
}
}