Skip to content

Commit

Permalink
Fix | SQL auth method validation on debug (#2288)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavoudEshtehari committed Jan 9, 2024
1 parent 84720a7 commit 2e4d1b6
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -524,7 +524,11 @@ internal static string ColumnEncryptionSettingToString(SqlConnectionColumnEncryp

internal static bool IsValidAuthenticationTypeValue(SqlAuthenticationMethod value)
{
Debug.Assert(Enum.GetNames(typeof(SqlAuthenticationMethod)).Length == 10, "SqlAuthenticationMethod enum has changed, update needed");
#if ADONET_CERT_AUTH && NETFRAMEWORK
Debug.Assert(Enum.GetNames(typeof(SqlAuthenticationMethod)).Length == 12, "SqlAuthenticationMethod enum has changed, update needed");
#else
Debug.Assert(Enum.GetNames(typeof(SqlAuthenticationMethod)).Length == 11, "SqlAuthenticationMethod enum has changed, update needed");
#endif
return value == SqlAuthenticationMethod.SqlPassword
|| value == SqlAuthenticationMethod.ActiveDirectoryPassword
|| value == SqlAuthenticationMethod.ActiveDirectoryIntegrated
Expand Down

0 comments on commit 2e4d1b6

Please sign in to comment.