コード例 #1
0
        private async Task CongratulateSubsAsync(IDialogContext context)
        {
            string congratulationsMsg = Miscellany.GetCorrectCongratsMessage(context, handSets.GetModelFeatures(chosenModel));

            await Miscellany.InsertDelayAsync(context);

            await context.PostAsync(congratulationsMsg);

            if (congratulationsMsg.StartsWith("Exce"))
            {
                await Miscellany.InsertDelayAsync(context);

                await context.PostAsync("The next step is to work out what plan is the best for you");
            }
            context.ConversationData.SetValue("SelectedPhone", chosenModel);
            //Ryans flow kicks in
            await Task.Delay(3000);

            if (CommonDialog.debugMessages)
            {
                await context.PostAsync("DEBUG : I'm going to call Ryan's node");
            }
            try
            {
                context.Call(new PlanNode(), PlanFlowDone);
            }
            catch (Exception xception)
            {
                await context.PostAsync("Error...xception message = " + xception.ToString());
            }
        }