How can I bind my outputs to an async function? The usual method of setting the parameter to out
doesn't work with async functions.
Example
using System;
public static async void Run(string input, TraceWriter log, out string blobOutput)
{
log.Info($"C# manually triggered function called with input: {input}");
await Task.Delay(1);
blobOutput = input;
}
This results in a compilation Error:
[timestamp] (3,72): error CS1988: Async methods cannot have ref or out parameters
Binding used (fyi)
{
"bindings": [
{
"type": "blob",
"name": "blobOutput",
"path": "testoutput/{rand-guid}.txt",
"connection": "AzureWebJobsDashboard",
"direction": "out"
},
{
"type": "manualTrigger",
"name": "input",
"direction": "in"
}
],
"disabled": false
}
See Question&Answers more detail:os