Azure 存储队列的绑定参数

Binding parameters for Azure Storage Queue

我按照以下教程使用 Azure Functions 将消息添加到队列。

https://docs.microsoft.com/en-us/azure/azure-functions/functions-integrate-storage-queue-output-binding#add-code-that-uses-the-output-binding

当我使用 Azure 门户网站创建函数时,它运行良好。现在我正在使用 Visual Studio。我很困惑如何将队列参数添加到我的函数定义中。

[FunctionName("PublishMessage")]
public static IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)]HttpRequest req,
    <<<<<<<<<<<<TODO: What to add here>>>>>>>>>>> ICollector<string> outputQueueItem,
    TraceWriter log)
{
    log.Info("C# HTTP trigger function processed a request.");

这是 function.json 文件中的参数(我需要将其添加到我的函数中),

{
  "type": "queue",
  "name": "outputQueueItem",
  "queueName": "outqueue",
  "connection": "AzureWebJobsDashboard",
  "direction": "out"
}

应该像

一样简单
[Queue("outqueue", Connection="AzureWebJobsDashboard")] ICollector<string> outputQueueItem