Exemplo n.º 1
0
        private async Task <DialogTurnResult> GameChoiceStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
        {
            if (stepContext.GetFoundChoiceFromResultAs <string>() != "None")
            {
                return(await stepContext.BuildChoicePrompt($"Amazing, let's play a {stepContext.GetFoundChoiceFromResultAs<string>()} game, which one would you like to play? ", _pdata.GetGameList(stepContext.GetFoundChoiceFromResultAs <string>()).ToArray(), cancellationToken));
            }
            else
            {
                await stepContext.Context.SendMultipleTextActivity(new[] {
                    "That's a shame, let me know when you do want to play by sending me any message to restart, I'm going for a nap ...",
                    "ZZZZZZZZZZzzzzzzzzzzzzzzzzzzzzzz......."
                });

                return(await stepContext.EndDialogAsync(null, cancellationToken));
            }
        }