Exemplo n.º 1
0
        public VoiceMenu GetMenu(string name)
        {
            VoiceMenu menu = null;

            _menus.TryGetValue(name, out menu);
            return(menu);
        }
Exemplo n.º 2
0
        public DynamicMenuService()
        {
            _menus = new Dictionary <string, VoiceMenu>();

            VoiceMenu myMenu = new VoiceMenu()
            {
                Name = "myMenu"
            };

            myMenu.Options.Add(new MenuOption()
            {
                Number = 1, PromptMsg = "To do this", TransitionTarget = "doThis"
            });
            myMenu.Options.Add(new MenuOption()
            {
                Number = 2, PromptMsg = "To do that", TransitionTarget = "doThat"
            });
            myMenu.Options.Add(new MenuOption()
            {
                Number = 3, PromptMsg = "To do whatever", TransitionTarget = "doWhatever"
            });
            _menus.Add(myMenu.Name, myMenu);
        }