in sdk/Sdk/FunctionMetadataGenerator.cs [858:881]
private static bool DoesConverterSupportTargetType(Collection<CustomAttribute> customAttributes, TypeReference bindingType)
{
// Parse attributes advertised by converter
foreach (CustomAttribute attribute in customAttributes)
{
if (string.Equals(attribute.AttributeType.FullName, Constants.SupportedTargetTypeAttributeType, StringComparison.Ordinal))
{
foreach (CustomAttributeArgument element in attribute.ConstructorArguments)
{
if (string.Equals(element.Type.FullName, typeof(Type).FullName, StringComparison.Ordinal))
{
var supportedType = element.Value as TypeReference;
if (supportedType is not null && string.Equals(supportedType.FullName, bindingType.FullName, StringComparison.Ordinal))
{
return true;
}
}
}
}
}
return false;
}