//public IAsyncVoid Open() //{ // if (m_thread != null) throw new ConnectionException("Opening allready opened connection "); // m_thread = new Thread(Run); // m_queue = new WaitQueue<object>(); // m_thread.Start(); // return InvokeVoid(DoOpen); //} //public IAsyncVoid Close() //{ // if (m_thread == null) throw new ConnectionException("Closing closed connection"); // return InvokeVoid(DoClose); //} public override bool IsBroken(DbTransaction trans) { try { using (DbCommand cmd = m_conn.CreateCommand()) { cmd.CommandText = m_dialect.GeneratePing(); cmd.Transaction = trans; using (DbDataReader reader = cmd.ExecuteReader(CommandBehavior.SchemaOnly)) { return(false); } } } catch { return(true); } }
public virtual string GeneratePing() { return(m_dialect.GeneratePing()); }