C# Azure Function 2.0绑定属性的ServiceBustigger

C# Azure Function 2.0绑定属性的ServiceBustigger,c#,azure,azure-functions,C#,Azure,Azure Functions,我正在尝试将名为:Properties IDictionary的Azure functions 2.0属性ServiceBusTrigger绑定为如下输入参数: public static class Function1 { [FunctionName("Function1")] public static void Run([ServiceBusTrigger("topic-name", "subscription-name", Connection = "connectio

我正在尝试将名为:Properties IDictionary的Azure functions 2.0属性ServiceBusTrigger绑定为如下输入参数:

 public static class Function1
{
    [FunctionName("Function1")]
    public static void Run([ServiceBusTrigger("topic-name", "subscription-name", Connection = "connection-string")]string mySbMsg, string  messageId, string correlationId, IDictionary<string,object> properties, ILogger log)
    {
        log.LogInformation($"C# ServiceBus topic trigger function processed message: {mySbMsg}");
    }
}
公共静态类函数1
{
[功能名称(“功能1”)]
public static void Run([ServiceBusTrigger(“主题名”、“订阅名”、Connection=“Connection string”)]string mySbMsg、string messageId、string correlationId、IDictionary属性、ILogger日志)
{
LogInformation($“C#ServiceBus主题触发函数处理的消息:{mySbMsg}”);
}
}
我得到一个错误:

Microsoft.Azure.WebJobs.Host:索引方法“Function1.Run”时出错。 Microsoft.Azure.WebJobs.Host:无法将参数“属性”绑定到IDictionary“2”类型。确保绑定支持该参数类型。如果您使用的是绑定扩展(例如ServiceBus、Timers等),请确保已在启动代码(例如config.UseServiceBus()、config.UseTimers()等)中调用了扩展的注册方法

作为我使用的一个来源:文档


MessageId和CorrelationId工作正常。如何获取:属性IDictionary>特定于应用程序的消息属性?

对于v2函数,元数据
属性
已更改为
用户属性
,请参阅相关和

添加(“用户属性”,类型(IDictionary))


您可以使用
IDictionary userProperties

在执行到servicebus的输出绑定时,如何设置userProperties?