private async Task <DialogTurnResult> RouteAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) { ConversationStateImpl conversationState = await Accessors.GetConversationStateOrDefaultAsync (stepContext.Context, cancellationToken); return(await stepContext.BeginDialogAsync(conversationState.CurrentDialog.ToString(), null, cancellationToken)); }
private async Task <DialogTurnResult> ReceiveResponseAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) { ConversationStateImpl conversationState = await Accessors.GetConversationStateOrDefaultAsync (stepContext.Context, cancellationToken); conversationState.CurrentDialog = DialogTypes.Echo; await Accessors.SetConversationStateAsync(stepContext.Context, conversationState, cancellationToken); return(await stepContext.EndDialogAsync()); }
private async Task <DialogTurnResult> EchoAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) { ConversationStateImpl conversationState = await Accessors.GetConversationStateOrDefaultAsync (stepContext.Context, cancellationToken); await stepContext.Context.SendActivityAsync(textReplyToSend : $"You said: {stepContext.Context.Activity.Text}"); conversationState.CurrentDialog = DialogTypes.Welcome; await Accessors.SetConversationStateAsync(stepContext.Context, conversationState, cancellationToken); return(await stepContext.EndDialogAsync()); }