- 
                Notifications
    You must be signed in to change notification settings 
- Fork 304
Description
The changes in Johtaylo/dialogrunasync (#5294) may need to be ported to maintain parity with microsoft/botbuilder-dotnet.
Fixes #5293This fix removes the duplicate code. It follows the suggestion made in the associated issue to share an internal implementation.
The main reason for this is because the DialogManager is expected to return a DialogTurnResult. RunAsync never returned this, because the very point of the function was to hide this, and the associated continue-begin dance, as it is meaningless to the caller. (Note when use directly in an IBot implementation the result is, naturally, ignored.)
The other, even more obscure, reason is that the DialogManager exposes indirectly the DialogSet the DialogContext uses. As it is, it seems hard to predict whether an application could make use of a potential side effect of that leak in the abstraction. Making this change this way with the internal function doesn't impact that as the internal function takes an already created DialogContext.
Please review and, if necessary, port the changes.