internal System.Data.ProviderBase.DbConnectionInternal CreatePooledConnection(DbConnection owningConnection, System.Data.ProviderBase.DbConnectionPool pool, System.Data.Common.DbConnectionOptions options) { System.Data.ProviderBase.DbConnectionPoolGroupProviderInfo providerInfo = pool.PoolGroup.ProviderInfo; System.Data.ProviderBase.DbConnectionInternal internal2 = this.CreateConnection(options, providerInfo, pool, owningConnection); if (internal2 != null) { this.PerformanceCounters.HardConnectsPerSecond.Increment(); internal2.MakePooledConnection(pool); } Bid.Trace("<prov.DbConnectionFactory.CreatePooledConnection|RES|CPOOL> %d#, Pooled database connection created.\n", this.ObjectID); return(internal2); }
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); } }
protected virtual System.Data.ProviderBase.DbMetaDataFactory CreateMetaDataFactory(System.Data.ProviderBase.DbConnectionInternal internalConnection, out bool cacheMetaDataFactory) { cacheMetaDataFactory = false; throw System.Data.Common.ADP.NotSupported(); }
internal abstract void SetInnerConnectionTo(DbConnection owningObject, System.Data.ProviderBase.DbConnectionInternal to);
internal abstract bool SetInnerConnectionFrom(DbConnection owningObject, System.Data.ProviderBase.DbConnectionInternal to, System.Data.ProviderBase.DbConnectionInternal from);
internal System.Data.ProviderBase.DbMetaDataFactory GetMetaDataFactory(System.Data.ProviderBase.DbConnectionPoolGroup connectionPoolGroup, System.Data.ProviderBase.DbConnectionInternal internalConnection) { System.Data.ProviderBase.DbMetaDataFactory metaDataFactory = connectionPoolGroup.MetaDataFactory; if (metaDataFactory == null) { bool cacheMetaDataFactory = false; metaDataFactory = this.CreateMetaDataFactory(internalConnection, out cacheMetaDataFactory); if (cacheMetaDataFactory) { connectionPoolGroup.MetaDataFactory = metaDataFactory; } } return(metaDataFactory); }