private async Task <SpeechletResponse> LaunchApp(Intent intent, Session session)
        {
            var appname      = intent.Slots["app"].Value;
            var speechOutput = "";

            if (!String.IsNullOrWhiteSpace(appname))
            {
                RokuClient.LaunchAppByName(rokuendpoint, appname);
                speechOutput = String.Format("Launching {0}", appname);
            }

            // Here we are setting shouldEndSession to false to not end the session and
            // prompt the user for input
            return(await BuildSpeechletResponse("Open App", speechOutput, false));
        }
        private async Task <SpeechletResponse> ControlRoku(Intent intent, Session session)
        {
            var keyvalues = intent.Slots["key"].Value;

            foreach (var v in keyvalues.Split(new String[] { " ", "," }, StringSplitOptions.RemoveEmptyEntries))
            {
                RokuClient.PressKey(rokuendpoint, (RokuClient.Keymap.Keys.Contains(v) ? RokuClient.Keymap[v] : v));
            }

            var speechOutput = String.Format("Pressing {0}", keyvalues);

            // Here we are setting shouldEndSession to false to not end the session and
            // prompt the user for input
            return(await BuildSpeechletResponse("Key Press", speechOutput, false));
        }
        private async Task <SpeechletResponse> TypeWords(Intent intent, Session session)
        {
            var speechOutput = "";
            var keyvalues    = intent.Slots["search"].Value;

            if (!String.IsNullOrWhiteSpace(keyvalues))
            {
                foreach (var v in keyvalues.ToCharArray())
                {
                    RokuClient.PressKey(rokuendpoint, "Lit_" + v.ToString().ToLower());
                    Thread.Sleep(10);
                }
                speechOutput = String.Format("Typing {0}", keyvalues);
            }

            // Here we are setting shouldEndSession to false to not end the session and
            // prompt the user for input
            return(await BuildSpeechletResponse("Typing", speechOutput, false));
        }