示例#1
0
        public string Get(int channel, string toSay)
        {
            _alertingService.Speak(channel, toSay);

            _historyRepository.Save(new Models.SpeechHistoryItem()
            {
                Channel = channel,
                Speech  = toSay,
                Date    = DateTime.Now
            });

            return("OK");
        }
示例#2
0
        public string Get(int channel, string toSay)
        {
            try
            {
                if (!_snoozeService.IsSnoozed())
                {
                    _alertingService.Speak(channel, toSay);
                }

                _historyRepository.Save(new Models.SpeechHistoryItem()
                {
                    Channel = channel,
                    Speech  = toSay,
                    Date    = DateTime.Now
                });

                return("OK");
            }
            catch (Exception ex)
            {
                return(ex.ToString());
            }
        }