in src/Microsoft.Azure.WebJobs.Extensions.Kafka/Output/SerializableTypeArgumentBindingProvider.cs [19:38]
public IArgumentBinding<KafkaProducerEntity> TryCreate(ParameterInfo parameter)
{
if (!parameter.IsOut)
{
return null;
}
var parameterType = GetNonRefType(parameter.ParameterType);
if (!SerializationHelper.IsDesSerType(GetNonArrayType(parameterType)))
{
return null;
}
if (parameterType.IsArray)
{
return (IArgumentBinding<KafkaProducerEntity>)Activator.CreateInstance(typeof(SerializableArrayTypeArgumentBinding<,>).MakeGenericType(parameterType, GetNonArrayType(parameterType)));
}
return (IArgumentBinding<KafkaProducerEntity>)Activator.CreateInstance(typeof(SerializableTypeArgumentBinding<>).MakeGenericType(parameterType));
}