-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add allowloop to repeat dialog and test #3778
Conversation
libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/RepeatDialog.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
OK, it seems tests passed but no result for coverage.. |
@@ -58,10 +70,16 @@ public override async Task<DialogTurnResult> BeginDialogAsync(DialogContext dc, | |||
var repeatedIds = dc.State.GetValue<List<string>>(TurnPath.RepeatedIds, () => new List<string>()); | |||
if (repeatedIds.Contains(targetDialogId)) | |||
{ | |||
throw new ArgumentException($"Recursive loop detected, {targetDialogId} cannot be repeated twice in one turn."); | |||
if (this.AllowLoop == null || this.AllowLoop.GetValue(dc.State) == false) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move this conidtion around the entire repeatedIds section, no need to track ids if you aren't using them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Close #3742