Are custom attributes available in the values passed to the TypesMatch override in LoopValueInjection?
I have a custom attribute on a String property, within a class I'm trying to inject from. When I perform my check in TypesMatch the sourceType does not return the custom attribute when queried.
For example, what I would like to work is:
protected override bool TypesMatch(Type sourceType, Type targetType)
return targetType == typeof(string)
&& sourceType.GetCustomAttributes(typeof(CustomAttribute), true).Count() > 0;
Is this a bug, or am I going about it the wrong way?