/// <summary>
 /// 查询远程数据库是否存在匹配
 /// </summary>
 /// <returns></returns>
 public override object[] MatchRedisDBData()
 {
     try
     {
         RedisDbControl redisDbControl = new RedisDbControl(this.SpeechQuestion);
         object         value          = redisDbControl.GetAnswer();
         if (!(value is false))
         {
             this.SpeechAnwser = value.ToString(); //不允许强制转换RdisValue类型
             return(new object[] { true, this.SpeechAnwser, core.merged.Come.REDIS_M });
         }
     }
     catch (Exception)
     {
         return(MatchIsTaskCommand());
     }
     return(MatchIsTaskCommand());
 }
Example #2
0
 /// <summary>
 /// 查询远程Redis数据库
 /// </summary>
 /// <returns></returns>
 private string QueryRedisDB(string qText)
 {
     try
     {
         RedisDbControl redisDbControl = new RedisDbControl(qText);
         object         value          = redisDbControl.GetAnswer();
         if (!(value is false))
         {
             this.answerText = value.ToString(); //不允许强制转换RdisValue类型
             return(this.answerText);
         }
     }
     catch (Exception)
     {
         return(WolframAlphaResponse(qText));
     }
     return(WolframAlphaResponse(qText));
 }