File tree Expand file tree Collapse file tree 6 files changed +28
-63
lines changed
src/Microsoft.Data.SqlClient
src/Microsoft/Data/SqlClient Expand file tree Collapse file tree 6 files changed +28
-63
lines changed Original file line number Diff line number Diff line change @@ -429,14 +429,12 @@ internal SqlClientFactory() { }
429
429
public override System . Data . Common . DbParameter CreateParameter ( ) { throw null ; }
430
430
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CreateDataSourceEnumerator/*'/>
431
431
public override System . Data . Common . DbDataSourceEnumerator CreateDataSourceEnumerator ( ) { throw null ; }
432
- #if NET6_0_OR_GREATER
433
432
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CanCreateBatch/*'/>
434
433
public override bool CanCreateBatch { get { throw null ; } }
435
434
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CreateBatch/*'/>
436
435
public override System . Data . Common . DbBatch CreateBatch ( ) { throw null ; }
437
436
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CreateBatchCommand/*'/>
438
437
public override System . Data . Common . DbBatchCommand CreateBatchCommand ( ) { throw null ; }
439
- #endif
440
438
}
441
439
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientLogger.xml' path='docs/members[@name="SqlClientLogger"]/SqlClientLogger/*'/>
442
440
public partial class SqlClientLogger
Original file line number Diff line number Diff line change 383
383
<Compile Include =" $(CommonSourceRoot)Microsoft\Data\SqlClient\SqlClientEventSource.cs" >
384
384
<Link >Microsoft\Data\SqlClient\SqlClientEventSource.cs</Link >
385
385
</Compile >
386
+ <Compile Include =" $(CommonSourceRoot)Microsoft\Data\SqlClient\SqlClientFactory.cs" >
387
+ <Link >Microsoft\Data\SqlClient\SqlClientFactory.cs</Link >
388
+ </Compile >
386
389
<Compile Include =" $(CommonSourceRoot)Microsoft\Data\SqlClient\SqlClientLogger.cs" >
387
390
<Link >Microsoft\Data\SqlClient\SqlClientLogger.cs</Link >
388
391
</Compile >
646
649
<Compile Include =" Microsoft\Data\SqlClient\SqlBulkCopy.cs" />
647
650
<Compile Include =" Microsoft\Data\SqlClient\SqlClientDiagnosticListenerExtensions.cs" />
648
651
<Compile Include =" Microsoft\Data\SqlClient\SqlClientEventSource.NetCoreApp.cs" />
649
- <Compile Include =" Microsoft\Data\SqlClient\SqlClientFactory.cs" />
650
- <Compile Include =" Microsoft\Data\SqlClient\SqlClientFactory.NetCoreApp.cs" />
651
652
<Compile Include =" Microsoft\Data\SqlClient\SqlColumnEncryptionEnclaveProvider.cs" />
652
653
<Compile Include =" Microsoft\Data\SqlClient\SqlColumnEncryptionEnclaveProvider.NetCoreApp.cs" />
653
654
<Compile Include =" Microsoft\Data\SqlClient\SqlConnectionFactory.AssemblyLoadContext.cs" />
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 423
423
<Compile Include =" $(CommonSourceRoot)Microsoft\Data\SqlClient\SqlClientEventSource.cs" >
424
424
<Link >Microsoft\Data\SqlClient\SqlClientEventSource.cs</Link >
425
425
</Compile >
426
+ <Compile Include =" $(CommonSourceRoot)Microsoft\Data\SqlClient\SqlClientFactory.cs" >
427
+ <Link >Microsoft\Data\SqlClient\SqlClientFactory.cs</Link >
428
+ </Compile >
426
429
<Compile Include =" $(CommonSourceRoot)Microsoft\Data\SqlClient\SqlClientLogger.cs" >
427
430
<Link >Microsoft\Data\SqlClient\SqlClientLogger.cs</Link >
428
431
</Compile >
668
671
<Compile Include =" Microsoft\Data\SqlClient\SqlBuffer.netfx.cs" />
669
672
<Compile Include =" Microsoft\Data\SqlClient\SqlBulkCopy.cs" />
670
673
<Compile Include =" Microsoft\Data\SqlClient\SqlCertificateCallbacks.cs" />
671
- <Compile Include =" Microsoft\Data\SqlClient\SqlClientFactory.netfx.cs" />
672
674
<Compile Include =" Microsoft\Data\SqlClient\SqlClientOriginalAddressInfo.cs" />
673
675
<Compile Include =" Microsoft\Data\SqlClient\SqlClientPermission.cs" />
674
676
<Compile Include =" Microsoft\Data\SqlClient\SqlClientWrapperSmiStream.cs" />
766
768
<Import Project =" $(NetFxSource)tools\targets\GenerateThisAssemblyCs.targets" />
767
769
<Import Project =" $(NetFxSource)tools\targets\GenerateAssemblyRef.targets" />
768
770
<Import Project =" $(NetFxSource)tools\targets\GenerateAssemblyInfo.targets" />
769
- </Project >
771
+ </Project >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3
3
// See the LICENSE file in the project root for more information.
4
4
5
5
using Microsoft . Data . Sql ;
6
+ using System ;
6
7
using System . Data . Common ;
7
8
using System . Security . Permissions ;
8
9
using System . Security ;
10
+ using Microsoft . Data . Common ;
9
11
10
12
namespace Microsoft . Data . SqlClient
11
13
{
12
14
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/SqlClientFactory/*'/>
13
- public sealed partial class SqlClientFactory : DbProviderFactory
15
+ public sealed class SqlClientFactory : DbProviderFactory
16
+ #if NETFRAMEWORK
17
+ , IServiceProvider
18
+ #endif
14
19
{
15
20
16
21
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/Instance/*'/>
@@ -65,6 +70,21 @@ public override CodeAccessPermission CreatePermission(PermissionState state)
65
70
{
66
71
return new SqlClientPermission ( state ) ;
67
72
}
73
+
74
+ /// <summary>
75
+ /// Extension mechanism for additional services; currently the only service
76
+ /// supported is the DbProviderServices
77
+ /// </summary>
78
+ /// <returns>requested service provider or null.</returns>
79
+ object IServiceProvider . GetService ( Type serviceType )
80
+ {
81
+ object result = null ;
82
+ if ( serviceType == GreenMethods . SystemDataCommonDbProviderServices_Type )
83
+ {
84
+ result = GreenMethods . MicrosoftDataSqlClientSqlProviderServices_Instance ( ) ;
85
+ }
86
+ return result ;
87
+ }
68
88
#endif
69
89
70
90
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CreateDataSourceEnumerator/*'/>
You can’t perform that action at this time.
0 commit comments