in src/Microsoft.Azure.WebJobs.Host/Bindings/ConverterManager.cs [151:175]
private void GetPossibleDestinationTypesFromSource(List<OpenType> typeDestinations, Type typeAttribute, Type typeSource)
{
foreach (var entry in GetEntries())
{
if (entry.IsMatchAttribute(typeAttribute) && entry.Source.IsMatch(typeSource))
{
if (entry.Attribute.IsAssignableFrom(typeAttribute))
{
typeDestinations.Add(entry.Dest);
// Counterpart to the GetComposition() calls in GetConverter.
if (entry.Dest is OpenType.ExactMatch exactType)
{
var intermediateType = exactType.ExactType;
if ((intermediateType == typeof(Stream)) ||
(intermediateType == typeof(JObject)) ||
(intermediateType == typeof(IEnumerable<JObject>) ))
{
GetPossibleDestinationTypesFromSource(typeDestinations, typeAttribute, intermediateType);
}
}
}
}
}
}