Yes there is. Using context.Call()
or context.Forward()
you can switch between dialogs. Please take a look at this sample project
Generally what people do is have a root dialog that routes to another dialog based on the context of the conversation. Here is an example from the sample I think where the root dialog is routing to another dialog using the context.Call()
method:
private async Task SendWelcomeMessageAsync(IDialogContext context)
{
await context.PostAsync("Hi, I'm the Basic Multi Dialog bot. Let's get started.");
context.Call(new NameDialog(), this.NameDialogResumeAfter);
}
You must provide a resume after method that fires off when the called dialog has completed. In the sample it looks like this:
private async Task NameDialogResumeAfter(IDialogContext context, IAwaitable<string> result)
{
try
{
this.name = await result;
context.Call(new AgeDialog(this.name), this.AgeDialogResumeAfter);
}
catch (TooManyAttemptsException)
{
await context.PostAsync("I'm sorry, I'm having issues understanding you. Let's try again.");
await this.SendWelcomeMessageAsync(context);
}
}