/// <summary> /// Method called after the <seealso cref="BotPersonaDialog"/> when called from the /// <seealso cref="Resume_AfterBotPersonaChoice"/> method. /// </summary> /// <param name="context">Mandatory. The context for the execution of a dialog's conversational process.</param> /// <param name="result">Mandatory. The user's preferred bot persona specified from the <see cref="BotPersonaDialog"/>.</param> private async Task Resume_AfterBotPersonaDialog(IDialogContext context, IAwaitable <string> result) { var activity = await result; await _messageHelper.ConversationPauseAsync(context, Pause.MediumPause); await context.PostAsync($"Good choice, my personality is set to be {activity}"); await _messageHelper.ConversationPauseAsync(context, Pause.ShortMediumPause); await context.PostAsync($"Okay the last step."); context.Call(_dialogBuilder.BuildPreferredWeatherLocationDialog(context.Activity.AsMessageActivity()), Resume_AfterPreferredWeatherDialog); await Task.CompletedTask; }
public async Task UpdatePreferredWeatherLocation(IDialogContext context, LuisResult result) { context.Call(_dialogBuilder.BuildPreferredWeatherLocationDialog(GetMessageActivity(context), result.Entities), Resume_AfterPreferredWeatherLocationDialog); await Task.Yield(); }