void WorkerThread() { while (!Cancelled) { BasicConnection conn = new BasicConnection(); conn.DoWork("Hello"); conn.DoWork("Goodbye"); } }
public void DoWork(string msg) { if (_Disposed) { throw new ObjectDisposedException("Error: PooledConnection used after Dispose"); } _Conn.DoWork(msg); }