public ResultSet ExecuteQuery(string query) { Callback callback = new Callback(); int len; int id = m_RootServer.ExecuteQuery(query, out len); ResultSet ret = new ResultSet(callback, id, m_RootServer, len); return ret; }
public ResultSet(Callback callback, int id, MockRootServer m_RootServer, int len) { this.callback = callback; this.id = id; this.len = len; this.m_RootServer = m_RootServer; m_TotalIndex = 0; callback.registerDelegate(new Callback.RecieveDelegate(delegateReciever)); }
public void GetSomeRows(int id, int start_index, int count, Callback callback) { List<string> ret = new List<string>(); int end_index = start_index + count; if (end_index > results.Count) { end_index = results.Count; } for (int i = start_index; i < end_index; ++i) { ret.Add(results[i]); } callback.recieve(ret); }