示例#1
0
        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();
        }
示例#2
0
        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);
        }
示例#3
0
 public void start(MySQLStatement query)
 {
     this.query     = query;
     this.available = false;
 }