IEnumerator postQuery(string sendLine) { QueryOut parms = new QueryOut(); sendLine = sendLine.Replace("%HESITATION", ""); parms.query = sendLine; byte[] bytes = Encoding.UTF8.GetBytes(JsonUtility.ToJson(parms)); //Dictionary<String, String> headers = new Dictionary<String, String>(); //headers.Add ("Content-type", "application/json"); string url = backendRootURL + "conversations/" + conversationNum.ToString() + "/query/"; print("Sending \"" + sendLine + "\""); //WWW response = new WWW(url, bytes, headers); //yield return response; yield return(PostJSON(url, bytes)); QueryIn reply = JsonUtility.FromJson <QueryIn>(_json); print(_json); _json = ""; receivedText = reply.reply; if (_voice) { _queryResources.Enqueue(reply.resource); } lineToSend = ""; }
public JsonResult List(QueryOut queryOut) { return(new JsonResult(new SingleResponse { TotalCount = outboundService.TotalCount(queryOut), Data = outboundService.PageList(queryOut) })); }
public int TotalCount(QueryOut queryOut) { return(this.Query(queryOut).Count()); }
private IQueryable <TOut> Query(QueryOut queryOut) { var query = wmsoutbound.TOuts; return(query); }
public List <TOut> PageList(QueryOut queryOut) { return(this.Query(queryOut).OrderByDescending(x => x.Id).ToList()); }