Example #1
0
        private async Task MessageReceivedAsync(IDialogContext context, IAwaitable <object> result)
        {
            var message          = await result as Activity;
            var dictionaryDialog = new DictionaryDialog();

            context.Call(dictionaryDialog, this.ShowPromptForNextWord);
        }
Example #2
0
        public async Task StartAsync(IDialogContext context)
        {
            await Task.FromResult("rootdialog");

            var dictionaryDialog = new DictionaryDialog();

            context.Call(dictionaryDialog, this.ShowPromptForNextWord);
        }
Example #3
0
 public async Task ShowPromptForNextWord(IDialogContext context, IAwaitable <object> result)
 {
     if (context.Activity.AsMessageActivity().Text == "end")
     {
         context.Fail(new Exception());
     }
     else
     {
         var dictionaryDialog = new DictionaryDialog();
         await Task.Run(() => context.Call(dictionaryDialog, this.ShowPromptForNextWord));
     }
 }