Jay Tina
Jay Tina

Reputation: 107

Bot Framework - IDialogStack.PollAsync deprecated after 3.5.0

I'm looking at the core-CreateNewConversation sample in the Bot builder examples repo (https://github.com/Microsoft/BotBuilder-Samples). There is a method available on IDialogStack called PollAsync that seems to be gone after version 3.5.0 of bot builder. Is there a reason for this?

Upvotes: 1

Views: 408

Answers (1)

Ezequiel Jadib
Ezequiel Jadib

Reputation: 14787

In reality, it was just moved from the IDialogStack class to the IDialogTask class.

Instead of doing:

IDialogStack stack = stack = scope.Resolve<IDialogStack>();

you have to do

IDialogTask task = scope.Resolve<IDialogTask>();

then you can just do:

task.Call(interruption, null);
await task.PollAsync(token);

There is a pull request that is updating the sample taking into account this change.

Upvotes: 2

Related Questions