Skip to content

Commit

Permalink
Merge | Align Task usage / ArrayPool / IsColumnEncryptionSupported ne…
Browse files Browse the repository at this point in the history
…tcore/netfx (#2982)

* Align IsColumnEncryptionSupported between netfx and netcore

* Align code styles

* Align variable order

* Align Task return

* Coding style alignments

* Align IsColumnEncryptionSupported between netfx and netcore

* Align code styles

* Align variable order

* Align Task return

* Coding style alignments

* Align Array renting netcore/netfx

* Align more ArrayPool usages

* Fix code review suggestions
  • Loading branch information
MichelZ authored Nov 26, 2024
1 parent 5519887 commit d4d5eba
Show file tree
Hide file tree
Showing 2 changed files with 195 additions and 168 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6002,7 +6002,7 @@ private TdsOperationStatus TryReadSqlStringValue(SqlBuffer value, byte type, int
}
else
{
s = "";
s = string.Empty;
}
}

Expand Down Expand Up @@ -12869,7 +12869,14 @@ internal int ReadPlpUnicodeChars(ref char[] buff, int offst, int len, TdsParserS
// requested length is -1 or larger than the actual length of data. First call to this method
// should be preceeded by a call to ReadPlpLength or ReadDataLength.
// Returns the actual chars read.
internal TdsOperationStatus TryReadPlpUnicodeChars(ref char[] buff, int offst, int len, TdsParserStateObject stateObj, out int totalCharsRead, bool supportRentedBuff, ref bool rentedBuff)
internal TdsOperationStatus TryReadPlpUnicodeChars(
ref char[] buff,
int offst,
int len,
TdsParserStateObject stateObj,
out int totalCharsRead,
bool supportRentedBuff,
ref bool rentedBuff)
{
int charsRead = 0;
int charsLeft = 0;
Expand All @@ -12882,7 +12889,7 @@ internal TdsOperationStatus TryReadPlpUnicodeChars(ref char[] buff, int offst, i
return TdsOperationStatus.Done; // No data
}

Debug.Assert(((ulong)stateObj._longlen != TdsEnums.SQL_PLP_NULL), "Out of sync plp read request");
Debug.Assert((ulong)stateObj._longlen != TdsEnums.SQL_PLP_NULL, "Out of sync plp read request");

Debug.Assert((buff == null && offst == 0) || (buff.Length >= offst + len), "Invalid length sent to ReadPlpUnicodeChars()!");
charsLeft = len;
Expand Down
Loading

0 comments on commit d4d5eba

Please sign in to comment.