Skip to content

Commit d99a04e

Browse files
committed
Set _isExperimental. Add comment to describe the property.
1 parent 831f27b commit d99a04e

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ public SqlRetryLogicBaseProvider RetryLogicProvider
155155

156156
internal SqlConnection(string connectionString, bool useExperimental) : this()
157157
{
158+
_isExperimental = useExperimental;
158159
if (_isExperimental)
159160
{
160161
_sqlConnectionX = new SqlClientX.SqlConnectionX(connectionString);
@@ -169,6 +170,7 @@ public SqlConnection(string connectionString) : this(connectionString, false)
169170

170171
internal SqlConnection(string connectionString, SqlCredential credential, bool useExperimental) : this()
171172
{
173+
_isExperimental = useExperimental;
172174
if (_isExperimental)
173175
{
174176
_sqlConnectionX = new SqlClientX.SqlConnectionX(connectionString, credential);

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ public sealed partial class SqlConnection : DbConnection
2222
private DbConnectionOptions _userConnectionOptions;
2323
private DbConnectionPoolGroup _poolGroup;
2424
private DbConnectionInternal _innerConnection;
25+
/// <summary>
26+
/// Indicates that this connection uses the experimental SqlClientX code path.
27+
/// When true, operations pass through _sqlConnectionX.
28+
/// </summary>
2529
private bool _isExperimental;
2630
private SqlConnectionX _sqlConnectionX;
2731
private int _closeCount;

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClientX/SqlConnectionX.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ public override bool CanCreateBatch
9797
protected override DbProviderFactory? DbProviderFactory
9898
=> throw new NotImplementedException();
9999

100-
101100
/// <inheritdoc/>
102101
public override void ChangeDatabase(string databaseName)
103102
=> throw new NotImplementedException();

0 commit comments

Comments
 (0)