All kinds of convenience methods for creating bindings in FluentBindingRule should have an overload that accepts a factory that can process a ValueBindingContext
See original GitHub issueThe FluentBindingRule
class contains a number of BindToXxx
methods that represent convenience APIs for creating attribute bindings for function parameters and for return values.
Two of such methods (BindToInput(..)
and BindToStream(..)
) have overloads that allow the value factory to inspect the ValueBindingContext
while creating the value bound by an attribute. This enables a number of scenarios: For example, it provides access to the name of the function being invoked, and to the id of the particular invocation instance. These values are otherwise not accessible.
Unfortunately, other BindToXxx
methods do not such overloads (BindToCollector(..)
and BindToValueProvider(..)
).
This proposal is to add corresponding overloads.
We currently require the respective BindToCollector(..)
overload for scenarios in the Availability Monitoring Extension. The BindToValueProvider(..)
overload should be added for consistency.
A candidate PR is readily available (https://github.com/Azure/azure-webjobs-sdk/pull/2489).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (2 by maintainers)
Top GitHub Comments
@fabiocav We still need this 😃
Yes, we need this. No need to keep asking, the answer is Yes.