Last active
December 29, 2017 12:16
-
-
Save r4hulp/4c577c4d9e13d16d7b58a677a00a3b86 to your computer and use it in GitHub Desktop.
RootDialog calling other dialog using dialog factory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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