private async Task <TransferObjectQnA> DefaultMatchHandlerWithReturn(IDialogContext context, string queryString, QnAMakerResult qnAMakerResultObject)
        {
            TransferObjectQnA transfer = new TransferObjectQnA
            {
                Answer   = qnAMakerResultObject.Answers.First().Answer,
                Question = queryString,
                Score    = qnAMakerResultObject.Answers.First().Score
            };

            return(transfer);
        }
 public async Task <TransferObjectQnA> QnAMakerResultProcessingWithReturn(IDialogContext context, string QueryString, QnAMakerResult QnAMakerResultObject)
 {
     if (QnAMakerResultObject.Answers.First().Score < 0.3)
     {
         return(await NoMatchHandlerWithReturn(context, QueryString));
     }
     else
     {
         return(await DefaultMatchHandlerWithReturn(context, QueryString, QnAMakerResultObject));
     }
 }
        private async Task DefaultMatchHandler(IDialogContext context, string queryString, QnAMakerResult qnAMakerResultObject)
        {
            var messageActivity = context.MakeMessage();

            messageActivity.Text = qnAMakerResultObject.Answers.First().Answer;
            await context.PostAsync(messageActivity.Text);
        }
 public async Task QnAMakerResultProcessing(IDialogContext context, string QueryString, QnAMakerResult QnAMakerResultObject)
 {
     if (QnAMakerResultObject.Answers.First().Score == 0)
     {
         await NoMatchHandler(context, QueryString);
     }
     else
     {
         await DefaultMatchHandler(context, QueryString, QnAMakerResultObject);
     }
 }