Ejemplo n.º 1
0
        public SalesOrderDialogSet(SalesDialogBotAccessors accessors, ICustomerIdDialog customerIdDialog,
                                   IProductDialog productDialog, IAnotherProductDialog anotherProductDialog,
                                   ISalesOrderPostDialog salesOrderPostDialog, IVoiceVerificationDialog voiceVerificationDialog)
        {
            Accessors = accessors;
            salesSet  = new DialogSet(accessors.OrderDialogState);

            var prompts = new List <Dialog>();

            prompts.AddRange(customerIdDialog.GetPrompts());
            prompts.AddRange(productDialog.GetPrompts());
            prompts.AddRange(anotherProductDialog.GetPrompts());
            prompts.AddRange(salesOrderPostDialog.GetPrompts());
            prompts.AddRange(voiceVerificationDialog.GetPrompts());

            salesSet.Add(new WaterfallDialog(customerIdDialog.GetName(), customerIdDialog.GetWaterfallSteps()));
            salesSet.Add(new WaterfallDialog(voiceVerificationDialog.GetName(), voiceVerificationDialog.GetWaterfallSteps()));
            salesSet.Add(new WaterfallDialog(productDialog.GetName(), productDialog.GetWaterfallSteps()));
            salesSet.Add(new WaterfallDialog(anotherProductDialog.GetName(), anotherProductDialog.GetWaterfallSteps()));
            salesSet.Add(new WaterfallDialog(salesOrderPostDialog.GetName(), salesOrderPostDialog.GetWaterfallSteps()));
            foreach (var dialog in prompts)
            {
                salesSet.Add(dialog);
            }
        }
Ejemplo n.º 2
0
        public ViewOrdersDialogSet(SalesDialogBotAccessors accessors, IViewOrdersDialog viewOrdersDialog,
                                   ICustomerIdDialog customerIdDialog, IVoiceVerificationDialog voiceVerificationDialog, IChatter chatter)
        {
            Chatter       = chatter;
            Accessors     = accessors;
            viewOrdersSet = new DialogSet(accessors.ViewOrdersDialogState);

            var prompts = new List <Dialog>();

            prompts.AddRange(viewOrdersDialog.GetPrompts());
            prompts.AddRange(customerIdDialog.GetPrompts());
            prompts.AddRange(voiceVerificationDialog.GetPrompts());

            viewOrdersSet.Add(new WaterfallDialog(viewOrdersDialog.GetName(), viewOrdersDialog.GetWaterfallSteps()));
            viewOrdersSet.Add(new WaterfallDialog(voiceVerificationDialog.GetName(), voiceVerificationDialog.GetWaterfallSteps()));
            viewOrdersSet.Add(new WaterfallDialog(customerIdDialog.GetName(), customerIdDialog.GetWaterfallSteps()));
            foreach (var dialog in prompts)
            {
                viewOrdersSet.Add(dialog);
            }
        }