${iServerJava6R_Query_QueryResult_Title}

${iServerJava6R_Query_QueryResult_Description}

        /// <summary>${iServerJava6R_ResultSet_method_fromJson_D}</summary>
        /// <returns>${iServerJava6R_ResultSet_method_fromJson_return}</returns>
        /// <param name="json">${iServerJava6R_ResultSet_method_fromJson_param_jsonObject}</param>
        public static QueryResult FromJson(JsonObject json)
        {
            if (json == null)
            {
                return null;
            }

            QueryResult result = new QueryResult();

            if (json.ContainsKey("totalCount") && json.ContainsKey("currentCount") && json.ContainsKey("customResponse") && json.ContainsKey("recordsets"))
            {
                result.TotalCount = (int)json["totalCount"];

                if ((int)json["totalCount"] == 0)
                {
                    return null;
                }

                result.CurrentCount = (int)json["currentCount"];
                result.CustomResponse = (string)json["customResponse"];

                JsonArray recordsets = (JsonArray)json["recordsets"];
                if (recordsets != null && recordsets.Count > 0)
                {
                    result.Recordsets = new List<Recordset>();

                    for (int i = 0; i < recordsets.Count; i++)
                    {
                        result.Recordsets.Add(Recordset.FromJson((JsonObject)recordsets[i]));
                    }
                }
                return result;
            }
            else if (json.ContainsKey("succeed") && json.ContainsKey("newResourceLocation"))
            {
                ResourceInfo info = new ResourceInfo();
                info.Succeed = (bool)json["succeed"];
                info.NewResourceLocation = (string)json["newResourceLocation"];
                info.NewResourceID = (string)json["newResourceID"];
                result.ResourceInfo = info;
                return result;
            }
            return null;
        }
 private void request_Completed(object sender, RequestEventArgs e)
 {
     JsonObject jsonObject = (JsonObject)JsonObject.Parse(e.Result);
     QueryResult result = QueryResult.FromJson(jsonObject);
     LastResult = result;
     QueryEventArgs args = new QueryEventArgs(result, e.Result, e.UserState);
     OnProcessCompleted(args);
 }
 /// <summary>${iServerJava6R_Query_QueryServiceEventArgs_constructor_D}</summary>
 /// <param name="result">${iServerJava6R_Query_QueryServiceEventArgs_constructor_param_result}</param>
 /// <param name="originResult">${iServerJava6R_Query_QueryServiceEventArgs_constructor_param_originResult}</param>
 /// <param name="token">${iServerJava6R_Query_QueryServiceEventArgs_constructor_param_token}</param>
 public QueryEventArgs(QueryResult result, string originResult, object token)
     : base(token)
 {
     Result = result;
     OriginResult = originResult;
 }