Exemplo n.º 1
0
        public async Task ChoiceReceivedAsync(IDialogContext context, IAwaitable <string> argument)
        {
            try
            {
                var answer = await argument;

                switch (answer)
                {
                case OptionHelp:
                    context.Call(new RoadAssistanceDialog(), CompleteDialogResumeAfter);
                    break;

                case OptionGlass:
                    context.Call(new AutoGlassDialog(), CompleteDialogResumeAfter);
                    break;

                case OptionClaim:
                    context.Call(new ReportClaimDialog(), CompleteDialogResumeAfter);
                    break;
                }
            }
            catch (TooManyAttemptsException)
            {
                await PromptHelper.HandleTooManyAttempts(context);
            }
        }