Skip to content

Commit

Permalink
Revert "Remove duplicate CacheConnectionStringProperties calls (dotne…
Browse files Browse the repository at this point in the history
…t#683)"

This reverts commit 4ae7ee9.
  • Loading branch information
TrayanZapryanov authored Aug 31, 2020
1 parent 2417c41 commit 14fa64f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ private static readonly ConcurrentDictionary<string, IList<string>> _ColumnEncry
public SqlConnection(string connectionString) : this()
{
ConnectionString = connectionString; // setting connection string first so that ConnectionOption is available
CacheConnectionStringProperties();
}

/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml' path='docs/members[@name="SqlConnection"]/ctorConnectionStringCredential/*' />
Expand Down Expand Up @@ -156,6 +157,7 @@ public SqlConnection(string connectionString, SqlCredential credential) : this()
// else
// credential == null: we should not set "Credential" as this will do additional validation check and
// checking pool groups which is not necessary. All necessary operation is already done by calling "ConnectionString = connectionString"
CacheConnectionStringProperties();
}

private SqlConnection(SqlConnection connection)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ public SqlConnection(string connectionString, SqlCredential credential) : this()
// else
// credential == null: we should not set "Credential" as this will do additional validation check and
// checking pool groups which is not necessary. All necessary operation is already done by calling "ConnectionString = connectionString"
CacheConnectionStringProperties();
}

private SqlConnection(SqlConnection connection)
Expand Down Expand Up @@ -3230,3 +3231,5 @@ internal struct MEMMAP
internal byte[] rgbData;
}
} // Microsoft.Data.SqlClient namespace


0 comments on commit 14fa64f

Please sign in to comment.