/// <summary> /// Method called after the user has chosen which persona they'd like buddy to use. /// </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="PersonalityChoiceHeroCard"/>.</param> private async Task Resume_AfterBotPersonaChoice(IDialogContext context, IAwaitable <IMessageActivity> result) { var activity = await result; PersonalityChatPersona personaChoice = (PersonalityChatPersona)Enum.Parse(typeof(PersonalityChatPersona), activity.Text); context.Call(_dialogBuilder.BuildBotPersonaDialog(context.Activity.AsMessageActivity(), null, personaChoice), Resume_AfterBotPersonaDialog); await Task.CompletedTask; }
public async Task UpdatePreferredBotPersona(IDialogContext context, LuisResult result) { context.Call(_dialogBuilder.BuildBotPersonaDialog(GetMessageActivity(context), result.Entities, PersonalityChatPersona.None), Resume_AfterBotPersonaDialog); await Task.Yield(); }