Skip to content

Commit 5cb73fd

Browse files
authored
Merged SqlClientFactory between .NET Core and Framework (#2369)
1 parent cc6ea21 commit 5cb73fd

File tree

8 files changed

+149
-213
lines changed

8 files changed

+149
-213
lines changed

src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs

+19-11
Original file line numberDiff line numberDiff line change
@@ -189,23 +189,23 @@ public class SqlAuthenticationParameters
189189
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationParameters.xml' path='docs/members[@name="SqlAuthenticationParameters"]/ctor/*'/>
190190
protected SqlAuthenticationParameters(Microsoft.Data.SqlClient.SqlAuthenticationMethod authenticationMethod, string serverName, string databaseName, string resource, string authority, string userId, string password, System.Guid connectionId, int connectionTimeout) { }
191191
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationParameters.xml' path='docs/members[@name="SqlAuthenticationParameters"]/AuthenticationMethod/*'/>
192-
public Microsoft.Data.SqlClient.SqlAuthenticationMethod AuthenticationMethod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
192+
public Microsoft.Data.SqlClient.SqlAuthenticationMethod AuthenticationMethod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
193193
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationParameters.xml' path='docs/members[@name="SqlAuthenticationParameters"]/Authority/*'/>
194-
public string Authority { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
194+
public string Authority { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
195195
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationParameters.xml' path='docs/members[@name="SqlAuthenticationParameters"]/ConnectionId/*'/>
196-
public System.Guid ConnectionId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
196+
public System.Guid ConnectionId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
197197
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationParameters.xml' path='docs/members[@name="SqlAuthenticationParameters"]/DatabaseName/*'/>
198-
public string DatabaseName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
198+
public string DatabaseName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
199199
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationParameters.xml' path='docs/members[@name="SqlAuthenticationParameters"]/Password/*'/>
200-
public string Password { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
200+
public string Password { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
201201
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationParameters.xml' path='docs/members[@name="SqlAuthenticationParameters"]/Resource/*'/>
202-
public string Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
202+
public string Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
203203
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationParameters.xml' path='docs/members[@name="SqlAuthenticationParameters"]/ServerName/*'/>
204-
public string ServerName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
204+
public string ServerName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
205205
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationParameters.xml' path='docs/members[@name="SqlAuthenticationParameters"]/UserId/*'/>
206-
public string UserId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
206+
public string UserId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
207207
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationParameters.xml' path='docs/members[@name="SqlAuthenticationParameters"]/ConnectionTimeout/*'/>
208-
public int ConnectionTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
208+
public int ConnectionTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
209209
}
210210
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationProvider.xml' path='docs/members[@name="SqlAuthenticationProvider"]/SqlAuthenticationProvider/*'/>
211211
public abstract partial class SqlAuthenticationProvider
@@ -231,9 +231,9 @@ public partial class SqlAuthenticationToken
231231
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationToken.xml' path='docs/members[@name="SqlAuthenticationToken"]/ctor/*'/>
232232
public SqlAuthenticationToken(string accessToken, System.DateTimeOffset expiresOn) { }
233233
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationToken.xml' path='docs/members[@name="SqlAuthenticationToken"]/AccessToken/*'/>
234-
public string AccessToken { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
234+
public string AccessToken { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
235235
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationToken.xml' path='docs/members[@name="SqlAuthenticationToken"]/ExpiresOn/*'/>
236-
public System.DateTimeOffset ExpiresOn { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
236+
public System.DateTimeOffset ExpiresOn { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
237237
}
238238
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBulkCopy.xml' path='docs/members[@name="SqlBulkCopy"]/SqlBulkCopy/*'/>
239239
public sealed partial class SqlBulkCopy : System.IDisposable
@@ -427,6 +427,14 @@ internal SqlClientFactory() { }
427427
public override System.Data.Common.DbDataAdapter CreateDataAdapter() { throw null; }
428428
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CreateParameter/*'/>
429429
public override System.Data.Common.DbParameter CreateParameter() { throw null; }
430+
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CreateDataSourceEnumerator/*'/>
431+
public override System.Data.Common.DbDataSourceEnumerator CreateDataSourceEnumerator() { throw null; }
432+
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CanCreateBatch/*'/>
433+
public override bool CanCreateBatch { get { throw null; } }
434+
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CreateBatch/*'/>
435+
public override System.Data.Common.DbBatch CreateBatch() { throw null; }
436+
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CreateBatchCommand/*'/>
437+
public override System.Data.Common.DbBatchCommand CreateBatchCommand() { throw null; }
430438
}
431439
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientLogger.xml' path='docs/members[@name="SqlClientLogger"]/SqlClientLogger/*'/>
432440
public partial class SqlClientLogger

src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

+3-2
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@
383383
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlClientEventSource.cs">
384384
<Link>Microsoft\Data\SqlClient\SqlClientEventSource.cs</Link>
385385
</Compile>
386+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlClientFactory.cs">
387+
<Link>Microsoft\Data\SqlClient\SqlClientFactory.cs</Link>
388+
</Compile>
386389
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlClientLogger.cs">
387390
<Link>Microsoft\Data\SqlClient\SqlClientLogger.cs</Link>
388391
</Compile>
@@ -646,8 +649,6 @@
646649
<Compile Include="Microsoft\Data\SqlClient\SqlBulkCopy.cs" />
647650
<Compile Include="Microsoft\Data\SqlClient\SqlClientDiagnosticListenerExtensions.cs" />
648651
<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" />
651652
<Compile Include="Microsoft\Data\SqlClient\SqlColumnEncryptionEnclaveProvider.cs" />
652653
<Compile Include="Microsoft\Data\SqlClient\SqlColumnEncryptionEnclaveProvider.NetCoreApp.cs" />
653654
<Compile Include="Microsoft\Data\SqlClient\SqlConnectionFactory.AssemblyLoadContext.cs" />

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientFactory.NetCoreApp.cs

-24
This file was deleted.

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientFactory.cs

-55
This file was deleted.

src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj

+4-2
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,9 @@
423423
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlClientEventSource.cs">
424424
<Link>Microsoft\Data\SqlClient\SqlClientEventSource.cs</Link>
425425
</Compile>
426+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlClientFactory.cs">
427+
<Link>Microsoft\Data\SqlClient\SqlClientFactory.cs</Link>
428+
</Compile>
426429
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlClientLogger.cs">
427430
<Link>Microsoft\Data\SqlClient\SqlClientLogger.cs</Link>
428431
</Compile>
@@ -668,7 +671,6 @@
668671
<Compile Include="Microsoft\Data\SqlClient\SqlBuffer.netfx.cs" />
669672
<Compile Include="Microsoft\Data\SqlClient\SqlBulkCopy.cs" />
670673
<Compile Include="Microsoft\Data\SqlClient\SqlCertificateCallbacks.cs" />
671-
<Compile Include="Microsoft\Data\SqlClient\SqlClientFactory.cs" />
672674
<Compile Include="Microsoft\Data\SqlClient\SqlClientOriginalAddressInfo.cs" />
673675
<Compile Include="Microsoft\Data\SqlClient\SqlClientPermission.cs" />
674676
<Compile Include="Microsoft\Data\SqlClient\SqlClientWrapperSmiStream.cs" />
@@ -766,4 +768,4 @@
766768
<Import Project="$(NetFxSource)tools\targets\GenerateThisAssemblyCs.targets" />
767769
<Import Project="$(NetFxSource)tools\targets\GenerateAssemblyRef.targets" />
768770
<Import Project="$(NetFxSource)tools\targets\GenerateAssemblyInfo.targets" />
769-
</Project>
771+
</Project>

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlClientFactory.cs

-98
This file was deleted.

0 commit comments

Comments
 (0)