public void MySQLCallback(MySQLStatement query, Delegate delg = null, params object[] args) { if (query.statement == "" || query.statement == null || query == null) { return; } this.waitingCallback.Add(new List <dynamic> { query, delg, args }); this.NextCallback(); }
public MySqlDataReader ExecuteAndFetch(MySQLStatement query) { AutoResetEvent aev = new AutoResetEvent(false); MySqlDataReader toreturn = null; var _loc1_ = new Action <MySqlDataReader>((MySqlDataReader reader) => { toreturn = reader; aev.Set(); }); this.MySQLCallback(query, _loc1_); while (true) { aev.WaitOne(); break; } return(toreturn); }
public void start(MySQLStatement query) { this.query = query; this.available = false; }