diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/TdsParser.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/TdsParser.cs index c5500a4da3..a5a6d97b27 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/TdsParser.cs +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/TdsParser.cs @@ -1844,7 +1844,7 @@ internal SqlError ProcessSNIError(TdsParserStateObject stateObj) string providerRid = String.Format("SNI_PN{0}", (int)sniError.provider); string providerName = StringsHelper.GetString(providerRid); - Debug.Assert(!ADP.IsEmpty(providerName), $"invalid providerResourceId '{providerRid}'"); + Debug.Assert(!string.IsNullOrEmpty(providerName), $"invalid providerResourceId '{providerRid}'"); uint win32ErrorCode = sniError.nativeError; if (sniError.sniError == 0) @@ -4326,7 +4326,7 @@ private TdsOperationStatus TryProcessLoginAck(TdsParserStateObject stateObj, out // Fail if SSE UserInstance and we have not received this info. if (_connHandler.ConnectionOptions.UserInstance && - ADP.IsEmpty(_connHandler.InstanceName)) + string.IsNullOrEmpty(_connHandler.InstanceName)) { stateObj.AddError(new SqlError(0, 0, TdsEnums.FATAL_ERROR_CLASS, Server, SQLMessage.UserInstanceFailure(), "", 0)); ThrowExceptionAndWarning(stateObj); @@ -6023,7 +6023,7 @@ private void WriteUDTMetaData(object value, string database, string schema, stri TdsParserStateObject stateObj) { // database - if (ADP.IsEmpty(database)) + if (string.IsNullOrEmpty(database)) { stateObj.WriteByte(0); } @@ -6034,7 +6034,7 @@ private void WriteUDTMetaData(object value, string database, string schema, stri } // schema - if (ADP.IsEmpty(schema)) + if (string.IsNullOrEmpty(schema)) { stateObj.WriteByte(0); } @@ -6045,7 +6045,7 @@ private void WriteUDTMetaData(object value, string database, string schema, stri } // type - if (ADP.IsEmpty(type)) + if (string.IsNullOrEmpty(type)) { stateObj.WriteByte(0); } @@ -9312,7 +9312,7 @@ private void WriteLoginData(SqlLogin rec, } // 4th one - if (!ADP.IsEmpty(rec.newPassword) || (rec.newSecurePassword != null && rec.newSecurePassword.Length != 0)) + if (!string.IsNullOrEmpty(rec.newPassword) || (rec.newSecurePassword != null && rec.newSecurePassword.Length != 0)) { log7Flags |= 1 << 24; } @@ -10121,7 +10121,7 @@ internal Task TdsExecuteRPC(SqlCommand cmd, IList<_SqlRPC> rpcArray, int timeout } else { - Debug.Assert(!ADP.IsEmpty(rpcext.rpcName), "must have an RPC name"); + Debug.Assert(!string.IsNullOrEmpty(rpcext.rpcName), "must have an RPC name"); tempLen = rpcext.rpcName.Length; WriteShort(tempLen, stateObj); WriteString(rpcext.rpcName, tempLen, 0, stateObj); @@ -11164,8 +11164,8 @@ private void WriteSmiTypeInfo(SmiExtendedMetaData metaData, TdsParserStateObject case SqlDbType.Xml: stateObj.WriteByte(TdsEnums.SQLXMLTYPE); // Is there a schema - if (ADP.IsEmpty(metaData.TypeSpecificNamePart1) && ADP.IsEmpty(metaData.TypeSpecificNamePart2) && - ADP.IsEmpty(metaData.TypeSpecificNamePart3)) + if (string.IsNullOrEmpty(metaData.TypeSpecificNamePart1) && string.IsNullOrEmpty(metaData.TypeSpecificNamePart2) && + string.IsNullOrEmpty(metaData.TypeSpecificNamePart3)) { stateObj.WriteByte(0); // schema not present }