public virtual Type GetMatchedType(string commandArgument)
{
try
{
return _candidateTypes.Single(
x => x.GetCustomAttributes(true).OfType<CommandHelpAttribute>().Single().Alias.ToLower() == commandArgument.ToLower());
}
catch (InvalidOperationException)
{
throw new ArgumentException("Command doesn't match any command alias");
}
}