@@ -18,11 +18,8 @@ namespace Microsoft.Data.ProviderBase
18
18
{
19
19
internal abstract class DbConnectionFactory
20
20
{
21
-
22
-
23
-
24
-
25
-
21
+ internal abstract DbConnectionPoolGroupProviderInfo CreateConnectionPoolGroupProviderInfo (
22
+ DbConnectionOptions connectionOptions ) ;
26
23
27
24
internal abstract DbConnectionPoolProviderInfo CreateConnectionPoolProviderInfo (
28
25
DbConnectionOptions connectionOptions ) ;
@@ -34,45 +31,7 @@ protected virtual DbMetaDataFactory CreateMetaDataFactory(DbConnectionInternal i
34
31
cacheMetaDataFactory = false ;
35
32
throw ADP . NotSupported ( ) ;
36
33
}
37
-
38
- internal DbConnectionInternal CreateNonPooledConnection ( DbConnection owningConnection , DbConnectionPoolGroup poolGroup , DbConnectionOptions userOptions )
39
- {
40
- Debug . Assert ( owningConnection != null , "null owningConnection?" ) ;
41
- Debug . Assert ( poolGroup != null , "null poolGroup?" ) ;
42
-
43
- DbConnectionOptions connectionOptions = poolGroup . ConnectionOptions ;
44
- DbConnectionPoolGroupProviderInfo poolGroupProviderInfo = poolGroup . ProviderInfo ;
45
- DbConnectionPoolKey poolKey = poolGroup . PoolKey ;
46
-
47
- DbConnectionInternal newConnection = CreateConnection ( connectionOptions , poolKey , poolGroupProviderInfo , null , owningConnection , userOptions ) ;
48
- if ( newConnection != null )
49
- {
50
- SqlClientEventSource . Metrics . HardConnectRequest ( ) ;
51
- newConnection . MakeNonPooledObject ( owningConnection ) ;
52
- }
53
- SqlClientEventSource . Log . TryTraceEvent ( "<prov.DbConnectionFactory.CreateNonPooledConnection|RES|CPOOL> {0}, Non-pooled database connection created." , ObjectID ) ;
54
- return newConnection ;
55
- }
56
-
57
- internal DbConnectionInternal CreatePooledConnection ( IDbConnectionPool pool , DbConnection owningObject , DbConnectionOptions options , DbConnectionPoolKey poolKey , DbConnectionOptions userOptions )
58
- {
59
- Debug . Assert ( pool != null , "null pool?" ) ;
60
- DbConnectionPoolGroupProviderInfo poolGroupProviderInfo = pool . PoolGroup . ProviderInfo ;
61
- DbConnectionInternal newConnection = CreateConnection ( options , poolKey , poolGroupProviderInfo , pool , owningObject , userOptions ) ;
62
-
63
- if ( newConnection != null )
64
- {
65
- SqlClientEventSource . Metrics . HardConnectRequest ( ) ;
66
-
67
- newConnection . MakePooledConnection ( pool ) ;
68
- }
69
- SqlClientEventSource . Log . TryTraceEvent ( "<prov.DbConnectionFactory.CreatePooledConnection|RES|CPOOL> {0}, Pooled database connection created." , ObjectID ) ;
70
- return newConnection ;
71
- }
72
-
73
- internal abstract DbConnectionPoolGroupProviderInfo CreateConnectionPoolGroupProviderInfo (
74
- DbConnectionOptions connectionOptions ) ;
75
-
34
+
76
35
protected DbConnectionOptions FindConnectionOptions ( DbConnectionPoolKey key )
77
36
{
78
37
Debug . Assert ( key != null , "key cannot be null" ) ;
@@ -568,14 +527,6 @@ internal void QueuePoolGroupForRelease(DbConnectionPoolGroup poolGroup)
568
527
SqlClientEventSource . Metrics . ExitActiveConnectionPoolGroup ( ) ;
569
528
}
570
529
571
- protected abstract DbConnectionInternal CreateConnection (
572
- DbConnectionOptions options ,
573
- DbConnectionPoolKey poolKey ,
574
- DbConnectionPoolGroupProviderInfo poolGroupProviderInfo ,
575
- IDbConnectionPool pool ,
576
- DbConnection owningConnection ,
577
- DbConnectionOptions userOptions ) ;
578
-
579
530
abstract protected DbConnectionOptions CreateConnectionOptions ( string connectionString , DbConnectionOptions previous ) ;
580
531
581
532
abstract protected DbConnectionPoolGroupOptions CreateConnectionPoolGroupOptions ( DbConnectionOptions options ) ;
0 commit comments