Как связать выходные значения с моей асинхронной функцией Azure?
Как я могу привязать свои выходы к асинхронной функции? Обычный метод установки параметра вout
не работает с асинхронными функциями
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;
}
Это приводит к ошибке компиляции:
[timestamp] (3,72): error CS1988: Async methods cannot have ref or out parameters
Связывание используется (к вашему сведению)
{
"bindings": [
{
"type": "blob",
"name": "blobOutput",
"path": "testoutput/{rand-guid}.txt",
"connection": "AzureWebJobsDashboard",
"direction": "out"
},
{
"type": "manualTrigger",
"name": "input",
"direction": "in"
}
],
"disabled": false
}