private void PreOpen() { if (_realConnection.DbConnection.State == ConnectionState.Open) { return; } OpenCount++; if (OpenFailures.Count <= 0) { return; } var fail = OpenFailures.Dequeue(); if (fail.HasValue) { throw SqlExceptionFactory.CreateSqlException(ErrorNumber); } }
void PreOpen() { if (DbConnection.State == ConnectionState.Open) { return; } OpenCount++; if (OpenFailures.Count <= 0) { return; } var fail = OpenFailures.Dequeue(); if (fail.HasValue) { throw new NpgsqlException(); } }
void PreOpen() { if (DbConnection.State == ConnectionState.Open) { return; } OpenCount++; if (OpenFailures.Count <= 0) { return; } var fail = OpenFailures.Dequeue(); if (fail.HasValue) { throw new PostgresException("Simulated failure", "ERROR", "ERROR", ErrorCode); } }