RootDialog calling other dialog using dialog factory
[Serializable] | |
public class RootDialog : IDialog<object> | |
{ | |
private ConversationReference conversationReference; | |
private IDialogFactory dialogFactory; | |
public RootDialog(IDialogFactory dialogFactory) | |
{ | |
this.dialogFactory = dialogFactory; | |
} | |
public async Task StartAsync(IDialogContext context) | |
{ | |
context.Wait(this.MessageReceivedAsync); | |
} | |
public virtual async Task MessageReceivedAsync(IDialogContext context, IAwaitable<IMessageActivity> item) | |
{ | |
var message = await item; | |
context.Call(this.dialogFactory.Create<ProfileDialog>(), this.AfterProfileDialog); | |
} | |
private async Task AfterDailyStatusDialogAsync(IDialogContext context, IAwaitable<object> result) | |
{ | |
context.Done("Thanks"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment