private static void ProcessGetResult(Request request) { Object[] requestData = request.getMethodParameters(); string id = requestData[0].ToString(); int startLine = Convert.ToInt32(requestData[1]); int numberOfLines = Convert.ToInt32(requestData[2]); QueryResult queryResult; ResultStorage resultStorage = ResultStorage.Instance; QueryDataset queryDataset = resultStorage.GetQueryResult(id, startLine, numberOfLines); queryResult = new QueryResult(Convert.ToInt32(id), "Resulting rows being posted."); IRootServerCallback iRootServerCallback = request.getRootServerCallback(); iRootServerCallback.PutDataset(queryResult, id, queryDataset); }
private static void ProcessExecQuery(Request request) { ITableServer tableServerObject = request.getTableServerObject(); Type created = tableServerObject.GetType(); Object resultObject = created.InvokeMember(request.getCallingMethod(), System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.InvokeMethod, null, tableServerObject, request.getMethodParameters() ); TableResponse tableResponse = (TableResponse)resultObject; IRootServerCallback iRootServerCallback = request.getRootServerCallback(); string id = tableResponse.GetId; QueryResult queryResult; queryResult = new QueryResult(Convert.ToInt32(id), tableResponse.GetMessage); iRootServerCallback.PutQueryInfo(queryResult, id, 0); }