Skip to content

port: Duplicate code across classic DialogExtensions.RunAsync and DialogManager #1573

@github-actions

Description

@github-actions

The changes in Johtaylo/dialogrunasync (#5294) may need to be ported to maintain parity with microsoft/botbuilder-dotnet.

Fixes #5293

This 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: SDKGeneral SDK issues that don't clearly map to other areas (e.g.: helper methods)ExemptFromDailyDRIReportUse this label to exclude the issue from the DRI report.needs-triageThe issue has just been created and it has not been reviewed by the team.parityThe issue describes a gap in parity between two or more platforms.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions