Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align ADP.IsEmpty -> string.IsNullOrEmpty #2961

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
}
Expand Down