Exemplo n.º 1
0
        private async Task CrowdSourcingInJH(IDialogContext context, IAwaitable <string> result)
        {
            var res = await result;

            switch (res)
            {
            case Prompts.NO:
                await context.PostAsync($"I am sorry. That is the extend of my knowledge for now. {Constants.ASKUSERFORNEXTQUESTION}");

                context.Done(this);     //Finish this dialog
                break;

            default:
                // Get Answer from QnAMaker service
                var answer = QNA.CallQnAService(QNAQuestions.ASKABOUTCROWDSOURCINGINJH);
                await context.PostAsync(answer);

                await context.PostAsync(Constants.ASKUSERFORNEXTQUESTION);

                context.Done(this);     //Finish this dialog
                break;
            }
        }
Exemplo n.º 2
0
        private async Task WhatIsCrowdsourcing(IDialogContext context, IAwaitable <string> result)
        {
            //await context.PostAsync("CrowdSourceDialog.AfterSelectOption");
            var res = await result;

            switch (res)
            {
            case Prompts.NO:
                PromptDialog.Choice(context, CrowdSourcingInJH,
                                    new string[] { Prompts.YES, Prompts.NO }, "do you mean about crowdsourcing at JH?");
                break;

            default:
                // Get Answer from QnAMaker service
                var answer = QNA.CallQnAService(QNAQuestions.ASKABOUTCROWDSOURCING);
                await context.PostAsync(answer);

                await context.PostAsync(Constants.ASKUSERFORNEXTQUESTION);

                context.Done(this);     //Finish this dialog
                break;
            }
        }