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