Skip to content

Instantly share code, notes, and snippets.

@r4hulp r4hulp/RootDialog.cs
Last active Dec 29, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.