public static void BeginExecuteReader(string connectionString, string commandText) { ManualResetEvent mre = new ManualResetEvent(false); var executor = new AsyncExecuteReaderWrapper(connectionString, commandText, mre); executor.BeginExecute(); mre.WaitOne(1000); }
public static void BeginExecuteReader(string connectionString, string commandText, int numberOfAsyncArgs) { ManualResetEvent mre = new ManualResetEvent(false); var executor = new AsyncExecuteReaderWrapper(connectionString, commandText, mre, numberOfAsyncArgs); executor.BeginExecute(); mre.WaitOne(1000); }