Esempio n. 1
0
        public SpeechletResponse ProcessChord(string chordName)
        {
            logger.Log($"Chord was: {chordName}");

            if (string.IsNullOrWhiteSpace(chordName))
            {
                return(PlainTextResponseFactory.Create(Messages.GenericNotRecognisedMessage, false));
            }

            try
            {
                return(CreateChordResponse(chordName));
            }
            catch (ChordNotFoundException exception)
            {
                var message = string.Format(Messages.SpecificNotRecognisedFormatMessage, exception.ChordName);
                return(PlainTextResponseFactory.Create(message, false));
            }
        }
Esempio n. 2
0
 public override SpeechletResponse OnLaunch(LaunchRequest launchRequest, Session session)
 {
     logger.Log($"OnLaunch called for session {session.SessionId}");
     return(PlainTextResponseFactory.Create("Say a chord name", false));
 }