I'm building a bot which should receive message from azure function and display that message to the user.
In this page there is the documentation for bindings of all azure services, but the bot output binding isn't documented.
I know that the output binding can be created setting the configuration from bindings.json
and using parameter out BotMessage message
in the function as described here, but this is the approach when developing functions with C# scripts. Instead I'm using .NET class libraries.
How can I achieve the ouput binding using .NET class libraries?
Install the following NuGet package : Microsoft.Azure.WebJobs.Extensions.BotFramework
(check Include prerelease
if you don't see it in Visual Studio 2017).
Then you should be able to mark your output parameter with corresponding binding attribute:
[Bot(BotId = "...")] out BotMessage message