Skip to content

Commit 81232b0

Browse files
JasonSowersTom Laird-McConnell
authored and
Tom Laird-McConnell
committed
Update PromptDialog.cs (#4714)
1 parent 0416704 commit 81232b0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

CSharp/Library/Microsoft.Bot.Builder/Dialogs/PromptDialog.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,16 @@ public static void Text(IDialogContext context, ResumeAfter<string> resume, stri
533533
context.Call<string>(child, resume);
534534
}
535535

536+
/// <summary> Prompt for a string. </summary>
537+
/// <param name="context"> The context. </param>
538+
/// <param name="resume"> Resume handler. </param>
539+
/// <param name="promptOptions"> The options for the prompt, <see cref="IPromptOptions{T}"/>.</param>
540+
public static void Text(IDialogContext context, ResumeAfter<string> resume, IPromptOptions<string> promptOptions)
541+
{
542+
var child = new PromptString(promptOptions);
543+
context.Call<string>(child, resume);
544+
}
545+
536546
/// <summary> Ask a yes/no question. </summary>
537547
/// <param name="context"> The context. </param>
538548
/// <param name="resume"> Resume handler. </param>
@@ -1197,4 +1207,4 @@ protected virtual IMessageActivity MakePrompt(IDialogContext context, string pro
11971207
return msg;
11981208
}
11991209
}
1200-
}
1210+
}

0 commit comments

Comments
 (0)