Exemple #1
0
        public string GetResponse(FoodContext ctx)
        {
            string key = GetKey(ctx);

            if (responses.ContainsKey(key))
            {
                return(responses[key]);
            }
            else
            {
                return(GetRandomResponse());
            }
        }
Exemple #2
0
 public string GetKey(FoodContext ctx)
 {
     return(GetKey(ctx.userid, ctx.time, ctx.weather));
 }