예제 #1
0
        private async Task <DialogTurnResult> CheckOrderStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
        {
            var activeCart = await PurchaseController.GetActiveCartFromUser(stepContext.Context.Activity.From.Id);

            if (activeCart == null)
            {
                await stepContext.Context.SendActivityAsync(MessageFactory.Text(noOrderMsg), cancellationToken);

                return(await stepContext.EndDialogAsync());
            }

            return(await stepContext.NextAsync(null, cancellationToken));
        }