internal override void OpenConnection(DbConnection outerConnection, System.Data.ProviderBase.DbConnectionFactory connectionFactory) { if (connectionFactory.SetInnerConnectionFrom(outerConnection, System.Data.ProviderBase.DbConnectionClosedConnecting.SingletonInstance, this)) { System.Data.ProviderBase.DbConnectionInternal to = null; try { connectionFactory.PermissionDemand(outerConnection); to = connectionFactory.GetConnection(outerConnection); } catch { connectionFactory.SetInnerConnectionTo(outerConnection, this); throw; } if (to == null) { connectionFactory.SetInnerConnectionTo(outerConnection, this); throw System.Data.Common.ADP.InternalConnectionError(System.Data.Common.ADP.ConnectionError.GetConnectionReturnsNull); } connectionFactory.SetInnerConnectionEvent(outerConnection, to); } }