简体   繁体   中英

How to get return binding Attribute for Azure FunctionApp binding

I have function:

[FunctionName("test-function")]
        [return: ServiceBus("topic-name", Connection = "connection-string")]
        public static Task<Message> TestFunction([TimerTrigger("%TimerSchedule%")]TimerInfo timer, ILogger log)
        {
            return Task.FromResult(new Message());
        }

How can I get ServiceBus attribute through reflecion as it is not part of methods CustomAttributes collection?

获取 .NET 方法返回值的属性数据

x.ReturnParameter.GetCustomAttributesData()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM