Investigate support for return value bindings
See original GitHub issueInvestigate whether we can simplify function signatures in cases where there is only a single ouput binding. Currently we require an output parameter. In such cases, it would be more natural to simply map the single output binding to the return value of the function.
Note that we already support this as a special case for HttpTrigger. We should investigate whether we can generalize that. In function.json since return values aren’t named in function signatures, we’d have to use a special name like “$return” or something. We also need to think through what this means for script languages like BAT where there is no “return value” for the function.
This would require core SDK changes to support return value attribute binding. E.g.:
[return: Blob("test", FileAccess.Write)]
public static string Test(
[QueueTrigger("test")] string message)
{
return "Testing";
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Knockout - Unable to process binding
It will display what that element is being bound to which is usually sufficient to help you get your head around what the...
Read more >Investigate passing a parameter through a binding #1080
Investigate passing a parameter through a binding #1080 ... We do support using the value from one binding for another. See this example,....
Read more >XAML data binding diagnostics - Visual Studio (Windows)
Use new tools in Visual Studio to detect and resolve data binding errors in XAML projects.
Read more >Java Bindings Metadata - Xamarin
We're currently investigating custom binding usage on the Xamarin ... NET namespaces, rename a class, or change the return type of a method....
Read more >Solving Customer Problems: Returns, Refunds, and Other ...
Return to the Store or Website. Explain the problem. Is the product faulty? Damaged? Did you get poor service or repairs that didn't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI: I’m prototyping this now. Basically I’m thinking we can just handle a “$return” output binding specially in our function generation. We map it to normal SDK “out” binding, and simply copy the return value into that out binding after invoking the users function. Meaning we wouldn’t actually have to add this to core SDK, where I don’t think there is much demand for it anyways.
Guys, take a look at the PR for this referenced above. You can see some example functions in the samples/tests.