azure-webjobs-sdk icon indicating copy to clipboard operation
azure-webjobs-sdk copied to clipboard

Refactor the trigger binding adaptor GetDefaultType() method to take into account the target

Open liliankasem opened this issue 2 years ago • 1 comments

The current implementation of GetDefaultType in TriggerAdapterBindingProvider (code) does not use the requestedType when checking if we have a converter that supports a given type.

Ideally, this should function in a similar way to GetDefaultType in BindToInputBindingProvider (code) where we actually use the requestedType before evaluating against the rules in the converterManager.

Refactor GetDefaultType in TriggerAdapterBindingProvider so that:

  • [ ] There isn't a special case for handling 'ParameterBindingData'
  • [ ] We are taking requestedType into account when checking if we have a converter that matches the type

liliankasem avatar Oct 25 '22 17:10 liliankasem

Looks like this behaviour was broken by this commit https://github.com/Azure/azure-webjobs-sdk/commit/23e180a6b2a2877d89f0eb42de1afe3a4beda4f2

liliankasem avatar Oct 26 '22 16:10 liliankasem