public bool Match(Type targetType, AspectDefinition aspect)
{
Type type = GetTypeToCompare(aspect);
if (type.IsGenericTypeDefinition && targetType.IsGenericType)
{
type = type.MakeGenericType(targetType.GetGenericArguments());
}
if (type.IsAssignableFrom(targetType))
{
return true;
}
return false;
}